Financial Trading in R

Start Free Preview

Buying via our links supports this free directory · Affiliate disclosure.
Course facts
  • Payment: Free Preview (Paid Upgrade)
  • Learning style: Self-paced, start anytime
  • Format: Text & Interactive
  • Video access: Streaming Only
  • Before you start: Intermediate R for Finance
DataCamp details
  • Chapters: 6
Available onDataCamp

Course Details
Learning Style

Start Anytime

Level

Intermediate

Study Mode

100% Online

Duration

Short (< 10 Hours)

Languages
Audio Language

English

Outcomes
Certificate

Certificate of Completion

Price & Terms
Pricing Model

Free Preview (Paid Upgrade)

Technical
Content Medium

Text & Interactive

Video Access

Streaming Only

Specification
Access

Subscription

Category: Tag: Brand:

Build signal-based trading strategies in R with quantstrat: indicators, signals, entry and exit rules, and performance checks with the Sharpe ratio.

At a glance
Duration5 hrs
LevelIntermediate
CertificateCertificate of Completion
LanguageEnglish
Taught byIlya Kipnis
AccessSubscription
Add your review
Add to wishlistAdded to wishlistRemoved from wishlist 0

Signal-based trading strategies are built step by step in R with the quantstrat package. You transform market data into indicators, turn the ways prices and indicators interact into signals, and write rules that open and close positions and set order sizes. The finished strategy then runs as a simulation and is judged on its trade statistics, its performance over time and its reward relative to risk.

What You Will Achieve

  • Pull financial data into R, plot it and overlay a moving average to read the trend
  • Configure a new quantstrat strategy with its time zone, currency and instruments
  • Write a custom indicator and combine several signals to drive entry and exit decisions
  • Judge a simulated strategy using profit factor, percent positive and the Sharpe ratio


Program Overview

Trading Philosophies and Strategy Setup

Why people trade, how momentum and oscillation approaches differ, and the settings quantstrat needs before a strategy can be built.

  • Momentum and oscillation trading philosophies
  • Trading system pitfalls and overfitting
  • Getting and plotting financial data
  • Quantstrat initialization settings

Indicator and Signal Construction

Trend and oscillation indicators, from ready-made library functions to one you code yourself, and the four quantstrat signal types built on them.

  • SMA and RSI functions
  • Coding and applying your own indicator
  • sigComparison, sigCrossover, sigThreshold and sigFormula
  • Combining signals

Trading Rules and Performance Analysis

Rules that act on signals, followed by running the strategy and reading how it performed.

  • Entry and exit rules with add.rule()
  • Order quantity, type, side and order sizing functions
  • Profit factor and percent positive
  • chart.Posn() charts and cash and returns Sharpe ratios

Certificate Awarded (Paid)


Job Outlook

Building and evaluating signal-based strategies in R is used in quantitative trading and finance work that turns market data into rules and measures returns against risk.


Our take

Good for: R users who already work with financial data and want to assemble, simulate and evaluate a rule-based trading strategy inside one package.

Keep in mind: The chapter on rules is a primer on how entry, exit and order sizing rules work, and it points to where to keep learning about them.

Bottom line: One quantstrat strategy grows layer by layer, with each chapter adding a piece and the last one measuring its reward against risk.

Frequently Asked Questions

Which signal types does quantstrat provide?

Quantstrat has four: sigComparison, sigCrossover, sigThreshold and sigFormula. Each describes how market data relates to an indicator or how two indicators relate, and the lessons practice every type before combining them.

Can I build my own trading indicator?

Yes. After working with pre-programmed indicators such as SMA and RSI from other libraries, you code an indicator of your own and apply it to market data within the strategy.

How is overfitting handled before strategy building starts?

The opening chapter defines overfitting as one of the pitfalls of trading systems and shows ways to prevent it, so the risk is understood before any quantstrat code is written.

How many ways of computing the Sharpe ratio are taught?

Two. The final chapter computes a cash Sharpe ratio and a returns Sharpe ratio in quantstrat, alongside trade statistics such as profit factor and percent positive.

User Reviews

0.0 out of 5
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0
★★★★★
0

No reviews yet. Be the first to review this course.

There are no reviews yet.

Write your review

Reviews can only be posted by registered learners. Log in, then you will return here to post.

×
Report this page
LiveTalent
Logo