+ All Categories
Transcript
Page 1: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

TradersMeetup.net

Page 2: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

DisclaimerDisclaimer: Neither TradersMeetup.net nor its organizers, hosts or presenters are licensed financial advisors, registered investment advisors, registered broker-dealer nor FINRA | SIPC | NFA-member firm. In accordance to the policies of TradersMeetup.net, this presentation does not provide investment or financial advice or make investment recommendations. TradersMeetup.net is not in the business of transacting trades, nor does TradersMeetup.net agree to direct your brokerage accounts or give trading advice tailored to your particular situation. The content of today’s presentation does not constitutes a solicitation, recommendation, promotion or endorsement of any particular security, other investment product, transaction or investment.

Trading Futures, Options on Futures, and retail off-exchange foreign currency transactions involves substantial risk of loss and is not suitable for all investors. You should carefully consider whether trading is suitable for you in light of your circumstances, knowledge, and financial resources. You may lose all or more of your initial investment. Opinions, market data, and recommendations are subject to change at any time.

All rights reserved. This Material may not be reproduced or distributed, in whole or in part, any other reproduction in whatever form and by whatever media, is expressly prohibited without the prior written consent of TradersMeetup.

No Soliciting. No Recording. No Photography.

Page 3: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

AGENDA• What is retail-based algorithmic trading

• Why do traders use this format

• Types of Trading Strategies

• Life Cycle: setup, planning, research, testing, portfolio diversification, etc.

• Idea Modeling & Strategy Review

• Risk Management, Position Sizing

• Backtesting, Walk-forward testing, incubation

• Tools, software, resources

Page 4: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Before we begin, consider . . .

Page 5: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

What is Algorithmic Trading?

• Employing computers to follow a set of instructions (an algorithm) to place trades for profit.

• Defined sets of rules can be based on timing, price, quantity or any mathematical model.

• Define the ENTRY and EXIT signals.

Page 6: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Simple Example using 2 moving average:

• Buy 50 shares of a stock when its 50-day moving average goes above the 200-day moving average.

• Sell shares of the stock when its 50-day

moving average goes below the 200-day

moving average.

Page 7: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

WHY TO PEOPLE USE IT ?

• Trades execute at best possible pricing

• Instant and accurate order placement

• Reduced risk of manual errors

• Can be backtested

• Reduce emotional/psychological factors that cause mistakes

Creates a systematic approach to trading whereby:

Page 8: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Types of Trading Strategies

• Trend-following Strategies

• Arbitrage Opportunities

• Index Fund Rebalancing

• Mathematical Model Based Strategies

• Trading Range (mean reversion)

There are an many different trading strategies to cater to what psychologically works for you.

• Volume Weighted Average Price (VWAP)

• Time Weighted Average Price (TWAP)

• Percentage of Volume (POV)

• Implementation Shortfall

• Sniffing Algos

• And many others!

Page 9: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

What do you need

• Computer programming knowledge (or hire a programmer or leverage premade software

• Trading platform

• Network connectivity

• Market data feeds

• Historical data for backtesting

To convert your strategy into computer code that can place orders you need:

Page 10: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Life CycleThis represents one of just many methods by which algo trading cycles

Initiation of an Idea, Research

IDEA & Quant. Analysis

Live Trading

PRODUCTION

Back Testing & Optimization, Forward Testing, Incubation

BACK TEST

Automation

AUTOMATION

Design and Development

Strategy Development

Page 11: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Idea Modeling

• Keep it simple

• Define your approach to time (Y,M,D,H,M,S,Ticks, other)

• Understand your Signal(s)

• What happens when your event takes place?

• Probability indicator

Page 12: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Risk Management

• Stop Loss (specific threshold or formula)• Profit Target (specific threshold formula)

Method you use can be dependent upon strategy you apply. (e.g. applying a fixed Stop Loss to a Mean Reversion strategy may reduce overall performance)

Page 13: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Position SizingPosition sizing is a technique that consists of adjusting the size or the number of shares/contracts of a position before or after initiating a buy or a short trading order.

Position sizing is very important and if applied correctly, it can dramatically improve your strategy performance and help you avoid ruin.

Some Position Sizing Techniques:

• Fixed Dollar Amount

• Fixed Risk per Trade

• Volatility based Position Sizing

• Kelly Criterion

• Averaging Down

• Optimizing Position Sizing variables

• others...

Page 14: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Backtesting, Walk Forward TestingBacktesting is carried out by exposing your particular strategy algorithm to a stream of historical financial data, which leads to a set of trading signals.

Backtesting should include all trading costs.

Walk Forward Testing: In Sample / Out of Sample

No backtest is perfect nor should be considered an indicator of what your future results would be.

Equity Curve

Draw Down

Monte Carlo

Variance Testing

Equity Bands

Seasonality

Noise Test

Fitness Function: Profit & Loss, Sharpe, Sortino, DrawDown, T-Test, etc.

Page 15: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Equity CurveStrategy Performance

Page 16: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Walk Forward TestingIn Sample / Out of Sample Data

Page 17: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Monte Carlo

Page 18: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Backtesting and BiasBacktesting is not perfect and prone to bias

• Optimization Bias - over optimization, curve fitting until strategy is ‘attractive’

• Look-Ahead Bias - due to tech. Bugs or parameter calculation• Survivorship Bias - testing on today’s stocks and not prior stocks that have

been delisted (one example)• Psychological Tolerance Bias - discretionary judgement to algo trade.• Host of other bias’ to consider.

Page 19: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Example Code

Page 20: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Example Chart

Page 21: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Example StrategyPerformance Report

Page 22: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Platforms

• TradeStation • MultiCharts• NinjaTrader• Trading Technologies• Cloud Based• Hosted Platforms• Many others!!• Or… write your own!

Page 23: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Reference

TradeStation Best Practices

https://clientcenter.tradestation.com/download/BestPractices.aspx

Page 24: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Q&A

Page 25: TradersMeetuptradersmeetup.net/wp-content/uploads/2018/09/Algo... · 2018. 9. 13. · No backtest is perfect nor should be considered an indicator of what your future results would

Algorithmic Trading - Thank you

Contact:

[email protected] &

[email protected]


Top Related