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 94,307 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

  #431 (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

As promised, here is a link to my system, based on RSIH (RSI with Hann windowing) for entries and fractals for exits, just published today:

Trading Idea 027 - RSIH Fractals 1

Here is a little something from that system (Jan 2010 - Jan 28, 2022), no reinvestment, scaling, or pyramiding, all trading costs accounted for:

Equity Curve with Run-up and Drawdown


That's it for now. I'm working on a different mean-reversion system now, but I have not decided on instruments. I still am looking for a good source for delayed futures data that I can link to MultiCharts. That is the only thing keeping me from building new futures systems.

~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?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Quantum physics & Trading dynamics
The Elite Circle
REcommedations for programming help
Sierra Chart
What broker to use for trading palladium futures
Commodities
use extra computer for optimisation
NinjaTrader
 
  #432 (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 want to mention a feature I came across in MultiCharts, which is not something I saw in TradeStation: building continuous contracts according to your own rollover criteria. This is extremely important in system development, as we do not always use volume or date based rollovers. Even more importantly, we do not always trade the front month contract. This is less obvious for things like gold, crude, and index futures, but more obvious for futures that you can only realistically trade several contracts out, such as Eurodollar.

In MultiCharts, depending on your data source, you may need to build 'Custom Futures', which is a way to build a continuous contract if your feed does not have a continuous contract. The screenshot below shows how we have the ability to build the contracts on something other than that front contract:



We can also build out futures based on our own rollover preferences. Traders of crude light (CL), for example, rollover at seemingly random times before expiration, i.e., they rollover when they are ready to rollover (maybe @SMCJB can correct me if my understanding is wrong). There is no real pattern here, as you may have with ES, when most people move to the next contract just before expiry. The point is, we have a lot of control over this.

I had some systems I was building for ED a long time ago, and backtesting was darn near impossible in TradeStation. In MC I can do it. It is extremely cumbersome (I have to add each contract symbol separately, then combine into a custom future), but I can get a LOT of data for futures, as in decades. I am moving away from IB for data given their 2 year limitation on historical data, and am currently testing Barchart as my data source, which has been very good thus far and is very fast, the fastest data feed I have used (including TradeStation).

~vmodus

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


Tradestation has this capability also.


Follow me on Twitter Reply With Quote
Thanked by:
  #434 (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


kevinkdog View Post
Tradestation has this capability also.


Ah, yeah I totally forgot about that, thanks @kevinkdog! I wish I knew that a few years ago when I was working with ED, though I never really explored the custom futures feature.

I'm not sure if TradeStation has individual historical contract data for building those custom futures, but I would guess they do.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #435 (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 thinking about mean-reversion systems, of which I have a few and which seem to perform well on aggregate. I have also been thinking about forex, particularly my inability to develop a decent system. The problem I have had is the tendency, as I see it, for forex to oscillate and trend very slowly. The oscillations or waves are what have always kicked me out of trades.

Taking the two together, I started thinking about forex with mean reversion. I have not developed any system for forex with mean reversion, so I figured I would give it a try. I decided to use Williams %R as my oscillator within a short lookback (2-3 period). It is very similar in behavior as the RSI, but I wanted some variety so that was my choice. Using a simple moving average as a trend filter, I take trades only in the direction of the prevailing trend.

One final thing is sizing my positions based on how deep into overbought or oversold we go. Example: for a long position, if I hit 2.15 %R on a scale of 0 - 100, then I will take a larger position than I would with 9.5 %R. (0 = extreme oversold). My hypothesis is, in plain language, the further extreme we get, the more likely a rebound in the other direction, thus we should load up our position size. This position sizing should provide great profitability.

Here is the manual test I did on EUR-USD forex pair, daily chart, from mid-2008 to early 2011, about 2.6 years (30 trades):


Annual return, based on account size required, was 89%; without position sizing it was 41%. I also manually tested EUR-AUD in a different time period, with similar results.

There is more to do, so I will continue to post updates, but I am happy with what I see.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #436 (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,388
Thanks Received: 10,207


kevinkdog View Post
Tradestation has this capability also.


vmodus View Post
Ah, yeah I totally forgot about that, thanks @kevinkdog! I wish I knew that a few years ago when I was working with ED, though I never really explored the custom futures feature.

The problem is in Tradestation it only works in certain situations. If your talking about rolling early or trading the 2nd month rather than the first month etc then sure it works fine. But if your trying to trade the 1 year out Eurodollar/GE/ED then it doesn't work. In my experience, contracts that list both serial and consecutive contracts don't work. Eurodollars is 10 years of quarterly serials (HMUZ) PLUS the four nearest non-quarterly months. So here we are Feb'22 and the prompt Eurodollar contracts are GHJKMNUZ (HMUZ quarterlies + GJKN prompt 4). When Feb expires they will add Q. But when H expires they will add V since U already exists. I believe this uneven contract listing is what makes things like the 1 year out Eurodollar not to work.

Reply With Quote
Thanked by:
  #437 (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
The problem is in Tradestation it only works in certain situations. If your talking about rolling early or trading the 2nd month rather than the first month etc then sure it works fine. But if your trying to trade the 1 year out Eurodollar/GE/ED then it doesn't work. In my experience, contracts that list both serial and consecutive contracts don't work. Eurodollars is 10 years of quarterly serials (HMUZ) PLUS the four nearest non-quarterly months. So here we are Feb'22 and the prompt Eurodollar contracts are GHJKMNUZ (HMUZ quarterlies + GJKN prompt 4). When Feb expires they will add Q. But when H expires they will add V since U already exists. I believe this uneven contract listing is what makes things like the 1 year out Eurodollar not to work.

Thanks @SMCJB. I am guessing that MultiCharts will suffer a similar problem, though I will only know through testing. I may work on ED in MultiCharts later this year if I have time (my dance card is filling up quickly). If/when I get that done, I will share here.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #438 (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

One point of clarification about using Williams' %R: this is a substitute/alternative to RSI. RSI would likely work well, though they are not identical.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #439 (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

Here is a quick update on the mean-reversion system I built for forex using Williams %R. This is the general idea:



The white line is a 40-day simple moving average, nothing fancy or exotic, just as a trend filter. I am working with daily charts, so the SMA calculates over the past 8 weeks, or just under two months. I only take mean reversion trades in the direction of the trend.

For this system, I built in position sizing. Without getting into detail, I am taking a larger position the deeper into overbought or oversold the %R goes, generally 100k, 200k, or 300k lot sizes (100x higher for Japanese Yen). This is what it looks like on a chart:



The results were a lot like other forex systems I have built: they work for a while, then don't work, then work for a while, then don't work.

My criteria for passing was >= 60% win %, profit factor >= 1.5, and adjusted profit factor (worst case) > 1. Here is the outcome of my walk-forward (2010 to 2011):



As per usual, I did not optimize any parameters. I played around a little with optimization just to see what would happen, but it did not improve the out-of-sample (OOS) outcomes. The average bars per win and loss are interesting to me. Generally, with mean-reversion, the longer a trade is on, the less likely it is to be profitable, and the data supports my observations (I have several hundred trades here).

So the idea failed, but I think there may be some promise with this on a weekly timeframe. I'm not convinced %R is better than RSI, but that is another project. I will post a link to my full analysis when I publish it later today.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #440 (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


Here is a link to my full analysis of the above system:

Trading Idea #028 - Williams %R [AUTOLINK]Mean Reversion[/AUTOLINK] 1

This was a fun system, particularly position sizing based on extremes. I am trying to think of another forex system for next time. Maybe a trend-following system, but I think the time horizon will have to be long. Hmmm....

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread 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