NexusFi: Find Your Edge


Home Menu

 





Attack of the Robots - An Algo Journal


Discussion in Trading Journals

Updated
      Top Posters
    1. looks_one vmodus with 357 posts (859 thanks)
    2. looks_two SMCJB with 38 posts (84 thanks)
    3. looks_3 kevinkdog with 27 posts (70 thanks)
    4. looks_4 bobwest with 13 posts (53 thanks)
      Best Posters
    1. looks_one bobwest with 4.1 thanks per post
    2. looks_two kevinkdog with 2.6 thanks per post
    3. looks_3 vmodus with 2.4 thanks per post
    4. looks_4 SMCJB with 2.2 thanks per post
    1. trending_up 93,553 views
    2. thumb_up 1,141 thanks given
    3. group 61 followers
    1. forum 478 posts
    2. attach_file 181 attachments




 
Search this Thread

Attack of the Robots - An Algo Journal

  #411 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853

I have been working with the MultiCharts Portfolio Trader and I am starting to run into some of it's limitations. Here are several things I have issue with:
  1. I cannot add commission and slippage
  2. I cannot mix and match symbols with signals (a/k/a systems or strategies)
  3. Optimization is done at the portfolio level, not the symbol level
I can deal with #1 by adding this to my code, though it is awkward. Thankfully for what I am doing now, it is the same (equities and ETF's).

The other two I will just have to deal with and find another solution.

This does not mean it does not provide some utility to me. For a system I am not planning to optimize, I can do my backtest and simply filter out the symbols that will not work well. Here is a list of S&P symbols in my test set (criteria: currently in S&P and started in the S&P before Jan 2, 2000; beginning with the letters A and B):



So I can at least take these and work with the ones I know are more likely to work with this system.

More to come later.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
Better Renko Gaps
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
Exit Strategy
NinjaTrader
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
21 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #412 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853

Since I am looking at Profit Factor as one of my criteria to 'pass' an instrument-system combination in our Walk-forward Analysis step (ref: Systematic Algo Trader - Trading System Development Process Flow)

Using just Profit Factor at this point, I use this for symbol/instrument selection for the next step:

Highlighted Symbols - Advance to Monte Carlo and Incubation


Anyhow, I just thought I would add a little more to the previous update.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #413 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,049 since Dec 2013
Thanks Given: 4,386
Thanks Received: 10,206



vmodus View Post
  1. Optimization is done at the portfolio level, not the symbol level

By this I assume you mean that if you are applying a single strategy to twenty instruments that the optimization finds the single set of variables that yield the highest portfolio results and not a set of variables for each individual instrument. I've always wondered about this. If it works with one set of variables across multiple instruments that has to make you feel really good. Question is if you run different optimizations for different instruments do you keep the instruments that have losing optimizations? I've back tested some published successful trend following strategies, where they use the same variable set across all instruments (futures) and have been surprised to find they continue to trade contracts that have continually lost money. It's interesting because when you look at the individual contract equity curves, many/most would make you cringe, but when combined they look nice. The power of uncorrelated (or even negatively correlated) instruments I assume.

Reply With Quote
Thanked by:
  #414 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


SMCJB View Post
By this I assume you mean that if you are applying a single strategy to twenty instruments that the optimization finds the single set of variables that yield the highest portfolio results and not a set of variables for each individual instrument.

Your assumption is correct: one set of optimized parameters for the entire portfolio. At least, that is all I do for now in MC. In TradeStation, using MultiOpt, as you know, we can optimize each instrument individually. So this is my limitation here with MC.


SMCJB View Post
Question is if you run different optimizations for different instruments do you keep the instruments that have losing optimizations? I've back tested some published successful trend following strategies, where they use the same variable set across all instruments (futures) and have been surprised to find they continue to trade contracts that have continually lost money. It's interesting because when you look at the individual contract equity curves, many/most would make you cringe, but when combined they look nice. The power of uncorrelated (or even negatively correlated) instruments I assume.

I think I understand why the classic trend followers do this (I am thinking of Jerry Parker, one of the turtles, and Niels Kaastrup Larsen, specifically). Jerry Parker talks a lot about catching that rare fat tail. They are okay with a 30% win rate, but they will catch that one fat tail trade that makes riding through all the bad trades worth it.

You hit on the two things that makes those equity curves look so good: diversification and negative correlation.

Small wins turning to losses, big wins turning to losses, big wins turning to small wins – get used to that in Trend Following.
- Jerry Parker

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #415 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,049 since Dec 2013
Thanks Given: 4,386
Thanks Received: 10,206

I agree. I think they have confidence in their methodology/process and believe that the next big fat tail is just as likely to happen in a instrument that has never worked as it is one that has worked several times. But if you follow that thought process, shouldn't you be testing strategies across all instruments not just single ones?

Reply With Quote
Thanked by:
  #416 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853


SMCJB View Post
I agree. I think they have confidence in their methodology/process and believe that the next big fat tail is just as likely to happen in a instrument that has never worked as it is one that has worked several times. But if you follow that thought process, shouldn't you be testing strategies across all instruments not just single ones?

Those trend followers, like Jerry Parker, just run what they have been running for decades across multiple instruments. They may have an instrument with multiple losing years, but then catch that one really good trade (I am thinking of RB's long beautiful run from last November (2020) running into this year as one example). They may optimize parameters, but they are still trend followers. Some of the systems you and I have worked with by way of @kevinkdog's classes require testing across multiple instruments.

To answer your question, yes, I do believe we have to look across as many instruments as possible. Here is one of my systems, based on the 40-in 20-out, which is one method of trend following:
https://systematicalgotrader.com/2021/05/07/sat2021-14-40-in-20-out/

The conclusion I came to was that the idea doesn't work on individual instruments, but works when combining instruments. The guy who runs the 40-in 20-out experiment commented on the system, so his thoughts add a lot of insight.

https://www.40in20out.com/

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #417 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853

@SMCJB, just for academic purposes, here is an equity curve of the 31 instruments in a portfolio from 1999 to 2021 on the same system, including the ones that would have failed walk-forward analysis:



...and the Monte Carlo, using @kevinkdog's worksheet, just for fun:


So there is some smoothing.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #418 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,271 since Feb 2017
Thanks Given: 2,958
Thanks Received: 2,853

Well happy new year to everyone and anyone! I wanted to share a couple interesting things.

I have been reading Algorithmic Short Selling with Python, by Laurent Bernut. This is an excellent book for those more experienced traders, particularly in the algo space. Forget about Python or short-selling in the title. This book is excellent for all of us algos and covers both long and short sides.

Bernut, who I first heard on Andrew Swanscott's Better System Trader podcast about a year ago, is a short selling expert. I've been following him on Quora and LinkedIn, and the man is simply brilliant.

In other news, I am developing a system based on John Ehlers latest article in TASC magazine (Jan 2022), the RSIH (H is for Hann window filter thingy; it is a finite response (FIR) filter originally used in meteorology). Ehlers' tireless work in trying to identify cycles and smooth indicators is on display here:

RSIH and RSI on Daily Chart - MTZ


The calculation period is 13 for both. The smoothing is noticeable immediately, but then we also see a lot of lag.

SPY - Weekly


This is another look using the SPY weekly chart. The system I am building will look for significant changes in RSI direction. The big advantage with the RSIH is the reduced number of signals. The hope is that it is enough to overcome lag. I'll post some of the results after I develop and test.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #419 (permalink)
 kevinkdog   is a Vendor
 
Posts: 3,663 since Jul 2012
Thanks Given: 1,892
Thanks Received: 7,357

Cool stuff! I agree Bernut's book is good. He was on Better System Trader podcast in mid December, in case you missed that new interview. He was a guest right after me.

Kevin

Follow me on Twitter Reply With Quote
Thanked by:
  #420 (permalink)
 
SMCJB's Avatar
 SMCJB 
Houston TX
Legendary Market Wizard
 
Experience: Advanced
Platform: TT and Stellar
Broker: Advantage Futures
Trading: Primarily Energy but also a little Equities, Fixed Income, Metals and Crypto.
Frequency: Many times daily
Duration: Never
Posts: 5,049 since Dec 2013
Thanks Given: 4,386
Thanks Received: 10,206


Happy New Year vmodus. Thanks for the interesting posts.

vmodus View Post
I have been reading Algorithmic Short Selling with Python, by Laurent Bernut.

Not a cheap book. That normally doesn't bother me but since its about Python (unfortunately I'm a R guy) I was wondering how relevant it would be to a non-Python user?

Reply With Quote
Thanked by:




Last Updated on March 31, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts