Professional Documents
Culture Documents
Comments Section:
Kevin Davey
Development Process
https://youtu.be/MyTsHK8CsQw
For effective strategy building, each strategy must pass each phase of building,
Most may fail, but this is the best way for objective and fact based data.
Trading Ideas
What do you want your system to
be ? How will it work? In Kevin
Davey’s Soybean example, he
decided that when volatility was
above average, he would go with
the momentum,and use a widestop
for his trade to have breathing room.
Monte-Carlo Simulation
You will input the parameters of the tests and trade data, and it will run a test for you. This
will give you useful metrics like risk of ruin, drawdown, return, etc. “Monte Carlo methods, or
Monte Carlo experiments, are a broad class of computational algorithms that rely on repeated
random sampling to obtain numerical results. The underlying concept is to use randomness to
solve problems that might be deterministic in principle.”
Incubation
Instead of trading your
system live as soon as you
are happy with it, Incubation
allows you to watch a strategy
before trading it live, to test
for mistakes. Here, you would
take an equity curve from
OOS, and put it into
incubation, by drawing a line
on the near right side of your
graph. This is more of a visual
discretionary test. If you can see that the line is significantly different on one side, you would
know either there was a significant change in the market, or something went wrong with
either your strategy or the way you optimized it. Changes in the equity curve line shouldn’t
be too erratic, and here you’ll see that Kevin’s incubation was successful, so he moved on to
the next step of the development process.
Manual WFA
https://youtu.be/A5izhMLirBE
Here, you want to test in overlapping chunks of data. So, you test the first period of
in-sample optimization, and get the best parameter, to use for the first OOS optimization.
Then you test for the best parameter on the second overlapping in sample optimizations,
and find the best parameter, which will be used for the second OOS optimization. So on and
so forth. Once you have attained all of your best OOS optimizations, combine them into one
test, and set them to run on their out of sample dates. For instance, you would run a test
where the stop loss is set to 850 for 2013, 975 for 2014, and 650 for 2015, and see how the
equity curve looks in total of the three years.
Trading Tips
Uncorrelated Strategies
Do not trade two long strategies on the same instrument, or two short strategies. Or maybe
even two trend systems. Keep them uncorrelated, so their drawdowns happen at different
times, ad your equity curve can smoothen out better.
It’s important to test with an optimal data size, preferably ten years. Trader A tests a system
on 6 months of data, with a great looking equity curve. You
would’ve completely F’d Yourself over. This is what a lot of us
were doing with the traditional NNFX way of testing
Trader B tests this same system, with 10 years of data
instead, and the equity curve looks drastically different.
Same strategy, but as you can see with more years of testing,
the accuracy of the test and the information becomes more
useful and effective.
The equity curve for a backtest with and without commissions and slippage are significantly
different. We want our tests to give us a very realistic interpretation of what our system is
capable of, so simulating realistic commissions and slippage values is paramount. Here is an
example.
The diagram on the right and left are the same system. The left one without simulated
slippage and commissions, and the one on the right with slippage and commissions. See
how if you went into live trading, you would’ve gotten bodied!!!
Never base your decisions using in-sample data. Your profits will always be lower, your
drawdowns will always be greater, and your position sizing won’t be as effective.
Don’t use renko bars, exotic bars, etc. They do not backtest well. They give wildly different
results, with awkward calculations and tend to repaint at times.
You need an ample amount of trades per optimized parameter. The more trades you have,
the better chance for robust parameters.
You should never assume limit orders are filled when touched during your backtest. It will
skew your results. Always backtest conservatively.
Diversify
https://youtu.be/cbxVrn8ZPYg
Trade multiple trading strategies. Profits add and drawdowns don't, creating a smoother and
easier to trade equity curve. This way if one tanks, the others can help, and vice versa.
Quitting
https://youtu.be/goViCxoWVfo
This isn’t your typically motivational message. The whole point of backtesting results is for
you to determine what the next best approach of your system is, and sometimes that is to
find something new.
Use backtest results like Monte Carlo and Probability cones, drawdown values, etc. to
determine if the strategy is no longer tradeable, and move onto a new strategy. You should
always know what will be your strategy stop signal ahead of time, and write it down, so that
you are ready for when this time comes.
Avoid Markets
https://youtu.be/V90f_exfTSE
This is optional, but sometimes you should avoid markets that are not doing what you want
them to do, until they decide to. For example
Why trend trade or counter trend trade Metals or currencies, if they are constantly
consolidating? Why not wait until they are trending, or exhibiting counter trend behaviour?
The decision is up to you.
https://youtu.be/sQgITAMjMs8
https://youtu.be/9nON0uzz1SI
Checklist 1
● Always avoid overconfidence
● Plans are a good way to improve
● When your making a Plan:
○ How’d past strategies perform?
○ What strategies are you currently trading?
○ What goals are you planning to achieve?
○ How will you get there?
See how you anticipated your strategy to perform in the backtest, as opposed to how it
actually performed. Also look at the history of strategies you’ve developed. Have they been
profitable? Have the stock indice strategies been doing the worse? You can do this on a
monthly, or annual basis. Figure out what is working and what is not. ALways be in constant
research and development.
Checklist 2
- How much did mistakes and errors cost you?
- What types of Money Management systems did you use? How’d they have an affect?
- Which systems are working? Which aren’t?
- The definition of insanity is repeating the same process, and expecting different
results
- What capital do you have available?
- What strategies do you plan to trade in the future
- Write down 20 unique ideas.and come up with 1-3 more each month!
- What type of Money do you have? Prop firm? What are you going to spend money
on? New software? Market data?
- What time will you allocate to building systems?
- Capital investments: Trading software, courses, and webinars
Goal Checklist
-Net Profit?
-Maximum drawdown?
-Quitting Point?
-Time for Trading?
-Trading Books?
-Strategies Evaluated?
Unorthodox (Entries)
https://youtu.be/zCng1Uy_gjg
1. Go with the momentum after a big range (you can set range values based on ATR?)
2. Breakout Report Play, go with the trend after a news report or session.
3. Look for low volume reversal points (mean reversion)
4. Go with the Trend, Regular Breakout
5. Money flow index cross above or below threshold
6. Buy at highest high and sell at lowest low
7. 3x3 pullback : if you are in a 3 month uptrend And price comes down and your in a 3
week downtrend, it’s a good time to buy. And Vice versa.
8. Enter on the Breakout of a longer term trend (read book about following the trend)
9. Have a short instrument and a long instrument, and enter on divergence and
convergence(riskier)
Certain conditions add a bias, and when the bias is above or below a certain
threshold, you would short or long
10. Dueling Momentum, go with short term momentum against long term momentum
Do not let Entries make you feel in control of the market. They also do not need to be over
complicated. Simple entries prove to be the most effective.
Do’s
https://youtu.be/5mWe4IEITJs
Don’ts
1. Don’t just assume a Guru is telling the truth
2. Don’t believe a system works without having it tested
3. Don’t assume something works just cuz it sounds like it makes sense
4. Don’t test with too many variables. 4 is the max you should aim for.
5. Don’t test on ALL of historical data
6. Have low expectations from your tests. As extreme as it sounds, assume your algo
will make you 1% per month even if it says 15. Any Backtest can do better or worse
7. Indicators with too many variables are risky. They add extra parameters to optimize
8. Do not expect anything to be certain
9. Do not expect every strategy to work. Make 20 and expect 0-2. The point is to be in
in a constant phase of R&D (Research and Development)
10. Don’t over-optimize
11. Don’t feel like you have to turn your system off during news periods. For every
decision you make, there has to be statistical proof. Your Algo may or may not be
bettered by news, but if the goal is to follow it, and you haven’t tested with news
filters, leave it on.
12. Don’t trend line trade for entries and exits. Price may not touch and you’ll be
screwed!
Symmetric Entries: use the value of x for long and x for short
Asymmetric: Use the value of x for long, and Y for short(be careful more parameters
required)
Orthodox Exits
1. Indicator based exits: if tdfi goes short, exit the long position for example
2. Time based exits. Exit at x time or x session
3. Profit target exits, stool loss exits
Automation Tips
1. Automation does not eliminate emotion but reduces it. Money and emotion will
always be correlated
2. Your job is just not to screw up
3. Keep you consistent
4. Can better find an edge
5. You don't need stops
6. Allows for efficient execution of rules
7. Automated should not mean Unattended
8. If your oversight, strategy, or setup is bad, you will lose bread! Your computer does
what it tells you
9. Make sue your broker supports automation
10. Determine required steps
11. Test it out 100 times to make sure it works properly
Nasty Pitfalls
https://youtu.be/uOgceqyYn-8
1. The Golden Rule of Trading, if the system is too good to be true, it probably is. No
one will sell you the holy grail
2.
3. Everything in backtesting is hypothetical. It is only real if it happened in your account
4. Curve fitting and over-optimization
5. Don’t trust systems that only show the performance of closed trades
6. Stay away from illiquid markets. Ex. orange juice m1. Gives unrealistic stats
7. Don’t be undercapitalized
8. You can’t optimize your way to success
9. Don’t try to optimize noisy markets. Noise is never consistent
10. Don’t let simulator trading take over, it can create bad habits
11. More param. Does not mean better. Use 4 or less params. Use the same variable for
entry and exit, and use less than 100 iterations(slight param optimization)
12. Don’t spend too much time trying to make something great! Have a return to
drawdown ratio threshold, to tell you the chances of a strategy being too bad,
or to good.
13. Make sure to forward test in real time (incubation)
14. Calculate the avg monthly profit from backtest and the real time monthly profit from
forward test. Then divide the realtime and backtest by each other to get a ratio or
value. Over time you will figure out what value works best for you to optimize your
own systems.
15. Use E ratio. What is the maximum profit during any point in the trade, and what
is your maximum loss during any point? Your max profit over your max loss
should be greater than 1-1.5 as another test for real edge. Calculate this for
entry rules. Include slippage and commission. This ratio was researched by
Kevin davey for years! You can develop your own strategy eventually.
16.
17. Last thing you want is a coin flip entry
18. You do not need your strategy to work on every timeframe
19. If you can’t at least dedicate 10 hours per week your boned
20. You need Money! Don’t forget Risk of Ruin. Small accounts get wiped bozo!
Use a risk of ruin calculator
21. Don’t use WR as a metric
22. Don’t be impatient
23. Do not expect to double your money or create 50 effective strategies in a
month
24. Not having entry ideas will be your downfall! You need ideas to create systems.
25.
26. Anyone can create a backtest. Real time results are king
27. Correlation tests are important
28.
Position Sizing
https://youtu.be/3SfzrQWYkiE
Simply increasing the size of your positions depending on a certain strategy. There is no
write or wrong answer for position sizing, and every system has their own methods.
You would test to see which position size strategy works best for your system in backtesting.
Do not go overboard here. This can have a significant Positive, or negative impact on your
equity curve.
1. Fixed Size
Doesn’t take advantage of compounding. Extremely safe.
3. Percent Risk
With the right position sizing method, you can either blow your account out, or get
really good returns. You really have to test this. There is no one size fits all. We want
amplified risk, and little reward. Here is the formula for this when seeing how position
sizing affects our strategies.
There’s tons of different ways to go about this. You can also use monte carlo analysis
to test them as well. And portfolios! Here are some books!
You may not have to spend too much time on this. It;s something Kevin doesn’t
spend too much time on. But you can definitely find some hidden gems here.
Market Turmoil
It's cool to take breaks from the marker
Use time filters to only trade at the most liquid times
Monitor Spreads
Monitor strategy correlation to avoid drawdown at the same time
Use a kill switch to stop all your strategies
Limit losses don’t improve profit
Set a no trade if the True range of the last 5 bars is extreme
Stops
1. Parabolic stops
2. Chandelier Exit
3. YoYo Exit
4. Time based
5. Stop and reverse (Kevin loves these ones)
6. Dollar Target
7. Moving Avg exit
8. Equity Curve MA stops (stop when ur equity breach the MA threshold)
9. Other indicator exit
10. Channel exit
11. Mean reversion exit
12. Small stops and profit targets are good for counter trend trading
Correcting Mistakes
Make a chart.
Continuous Improvement
That’s all Folks
Good Luck WIth your Algo Trading Endeavours!