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 91,873 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

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


Maelstrom View Post
Half mutt here myself, but my mom and grandmother are from the Azores. Had a chance to spend a couple of summers there when I was a kid, and it may very well be the retirement spot for us someday.

I would love to visit the Azores. Apparently, they produce a lot of milk there, as all of the milk we had in Portugal was from there.

Like you, we are considering retiring there as well. English is essentially a second language there and it is mandatory in schools starting with 5th grade. Lots of Brits go to the coast for holiday, so it is critical to their tourism industry.

Have a good weekend yourself!

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Futures True Range Report
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #132 (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 did think too much about this, but I realized that I was trading the day before a US holiday weekend. Generally we don't trade this day, but that is typically when we are swing trading (holding overnight). Since all of my back testing has included the day before a holiday, I figured that I would just let everything run until the end of the normal day, since I day trade these two strategies.

So a couple of weird things happened, and I swear my early morning musings here were just about prophetic: "Automated trading is not unattended trading." As mentioned earlier, I did my grocery shopping, fueled the car and returned home. I checked my strategies, everything was moving along nicely. Had some incredibly spicy Korean chicken ramen for lunch, then checked my PC. The system had frozen, while live, in two positions (ED and VX).

Long story short, some trades were missed for VX, so my strategy and sim do not quite match. After restarting, it got a little weird in that it seemed like my strategy tried to catch-up by placing an additional order (I think). Anyhow, lesson learned there. My wife and trading partner uses the TradeStation app to monitor her trades when she is away from her desk and running an automated strategy.

~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~

Overall Results - 2 Strategies
I figure today I would start with the overall results, since it is easier to just show my little spreadsheet:


My strategy is following sim pretty closely now. This tells me that execution of the strategy in sim is working. This is great news. Execution live is a whole different situation, but this is very close.

~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~

VX Strategy
I expected today to be bad, since it is the Friday before a holiday. Volume was still substantial enough to support trading.

Strategy versus Sim
  • Strategy Report: Net Profit = $345
  • Sim Trading: Net Profit = $329
  • Win rate = 67% (18 trades/9 round trips)
In sim, I lost two trades when my PC was frozen for about 40 minutes. I had to fix this in the Trade Manager (where we can place, cancel, or modify orders). Actual win rate was lower than the strategy win rate shown earlier.

Overall, I'm happy with this. Last night I compared the equity curve for my walk-forward optimization (which is used to identify the parameters with the highest probability for success) versus my equity curve that I showed in yesterday's journal entry, and they are almost identical. That is incredible. I have pretty good confidence that this strategy will be successful.

~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~

ED Strategy
This is the same story all week: range. Still, we got on the right side and made a little funny money.

Strategy versus Sim
  • Strategy Report: Net Profit = $95
  • Sim Trading: Net Profit = $101
  • Win rate = 100% (2 trades/1 round trip)
I'm neutral on this strategy. It is doing exactly what it is supposed to. The market is just not playing along. As a result of this boring situation, I was able to identify a possible discretionary trading opportunity for Eurodollar. I will explain in the next section.

I think this strategy will be profitable, but right now we are in a lull. I need to understand more of the fundamentals driving interest rates, aside from the obvious (Fed meetings, etc.).

~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~
Eurodollar Discretionary Trading
One interesting thing that I see with Eurodollar is that when the price is stuck, as shown by ATR being below the minimum point move (.005), the price just oscillates between two prices, occasionally touching a third price, but always returning. I think that this can be traded, but I'm not sure.

Today I took one discretionary trade, using this theory. I sold 10 contracts at the bottom price (limit order) and then placed a limit order to buy at the top price (my exit). It worked great. Essentially, it is a 1 tick win, which nets about $101 for 10 contracts. Here is what the chart looks like:



I could possible write a strategy for this, or just trade it when I see it. In any case, here is another little opportunity that may have some merit.

~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~

Weekly Results (Sim only)
Here are my net profit/losses for the week:

VIX Futures:
  • Sim: $1,981
  • Strategy: $2,500

The difference in VX was due to the stop loss and end of day issues that I resolved Thursday. Also, there was the system crash.

Eurodollar:
  • Sim: $162
  • Strategy: -$20
The difference in Eurodollar was related to not setting my dates on the strategy Sunday evening, plus discretionary exits and trades when we were obviously stuck in a range.

Overall:
  • Sim: $2,042
  • Strategy: $2,260
Despite the issues I had, my sim results were pretty close. I expect that by resolving user error and the bugs in the VX code, sim and strategy would be even closer.

~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~

This post was way too long. It is well past wine o'clock, so I am going to wrap it up. I hope you had a good trading week and I will see you all next Tuesday!

~vmodus out!

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #133 (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 only have a few minutes, but wanted to post an update. I setup my VX strategy live and it didn't go well. I had several checkpoints setup throughout the day to stop the strategy if it was failing. There were two bad trades, but no good trades.

Bad trade 1:
Order was entered long, then a reversal order short, but limit order never hit, so I was on the wrong end of a long move. I let it run, to a loss of $400. I could and should have pulled the plug at $150, because my short order wasn't going to get filled.

Bad trade 2:
Order was entered short, but it took so long to fill (11+ minutes) that the market had already exhausted itself and started to reverse when the order was finally filled. This was a loss of $200.

Other trades were either flat or small losses that were reflected on the strategy performance report, so not all trades were a bust, just two. I was able to mitigate the losses with two discretionary trades, to the tune of +$100.

Lessons learned:
  • 5 minute chart won't work on VX due to long time to fill; looking at 15, 18, 20 and 30 minute timeframes.
  • A stop loss appears to be required here, due to the slow fills
  • Due to the way orders are placed, I actually need to keep a minimum of 2 times the initial margin (2 * 8800 = $17,600), since I may have two orders in queue at the same time. Otherwise I need to place an order that was rejected for insufficient purchasing power. This issue may go away with a longer timeframe, but for now I will have to monitor.
  • For now I need to babysit the strategy.

Overall I'm not terribly pleased with the results, but at least my results were sufficient to stop the process. I don't need a sample of 30 bad trades to tell me the system is not working. I am evaluating the 18 minute timeframe, which tested as well as the 5 minute in walk-forward optimization. I will decide tonight or early tomorrow if I will switch timeframes.

~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~

See ya' tomorrow!

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #134 (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,041 since Dec 2013
Thanks Given: 4,375
Thanks Received: 10,192

Regarding Eurodollars, the prompt contract will rarely move much. How much can interest rates really move in the next 15-30 days? A lot of people trade the 4th contract in the H, M, U, Z cycle which would currently be Z20. Don't worry about liquidity as this contract will trade >1M contracts/day. Now your trading an interest rate 270-360 days in the future which can move a lot more! If your using Tradestation though be careful with their Eurodollar custom contracts as the rolls are often wrong.

Reply With Quote
Thanked by:
  #135 (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
Regarding Eurodollars, the prompt contract will rarely move much. How much can interest rates really move in the next 15-30 days? A lot of people trade the 4th contract in the H, M, U, Z cycle which would currently be Z20. Don't worry about liquidity as this contract will trade >1M contracts/day. Now your trading an interest rate 270-360 days in the future which can move a lot more! If your using Tradestation though be careful with their Eurodollar custom contracts as the rolls are often wrong.

Thanks! I'm currently using the Z 2020 contract, as it has the liquidity, which initially drew me to ED in the first place. Plus, I can trade the separate contracts if I want. I will have to keep an eye on TradeStation, but I don't generally hold overnight positions or do rollovers (yet at least).

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #136 (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 a few thoughts about yesterday. I was working a 5 minute chart, which in hindsight was pretty aggressive for an instrument (VX) that only accepts limit orders. I took a look at my trade manager and I see that most orders were filled within 12 minutes or less. Given that, I decided to move to an 18 minute timeframe for trading. This generates a lot fewer trades and signals, but they are of the same quality.

My walk-forward optimization parameters yielded an 88% win rate on unseen data (Jan 12th to 21st) on 50 trades. Yesterday's win rate would likely have been 50%.

The interesting thing about yesterday is that it would have been a losing day on the 18 minute chart, -$268. I'm okay with that, as it comes closer to my actual losses for yesterday, -$564 (exacerbated by not having a stop loss). I can't compare apples to apples on the different timeframes, but it works nonetheless.

The Problem with Fills
The next problem I have to consider is: will my orders even get filled? With a longer timeframe, that is less of a problem because I have few signals. Here is the problem on 5 minute chart:
  • 905 > Go long 1 contract @14.50
  • 910 > order still not filled
  • 915 > order still not filled
  • 920 > Go short 1 contract, order rejected (still have an order for 1 long contract, not enough margin for both orders)
  • 921 > Long order filled (doh!) ... yeah, we are in the wrong direction!
On an 18 minute chart, it would look like this:
  • 918 > Go long 1 contract @14.55
  • 929 > Order filled
  • 932 > Reverse position, sell 1, then sell short 1 contract @14.60
So this may work. One area of concern will be getting filled on a reversal (exit and re-entry). I will have to see how that plays out with the longer timeframe. The unfortunate thing is that within sim, it will produce good results. So I have no choice but to test it live.

Bottom Line
I think the problems seen yesterday are fixable. The strategy needs to be babysat for now, though new signals generally cancel out orders that don't get filled. I have a goal of at least 75% of orders filled, which I think is achievable. There are orders that just won't get filled, and that is okay.

My strategy kicks off in about 3 minutes, so I have run. See you later today!

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #137 (permalink)
 
bobwest's Avatar
 bobwest 
Western Florida
Site Moderator
 
Experience: Advanced
Platform: Sierra Chart
Trading: ES, YM
Frequency: Several times daily
Duration: Minutes
Posts: 8,162 since Jan 2013
Thanks Given: 57,341
Thanks Received: 26,267


vmodus View Post
The Problem with Fills
The next problem I have to consider is: will my orders even get filled? With a longer timeframe, that is less of a problem because I have few signals. Here is the problem on 5 minute chart:
  • 905 > Go long 1 contract @14.50
  • 910 > order still not filled
  • 915 > order still not filled
  • 920 > Go short 1 contract, order rejected (still have an order for 1 long contract, not enough margin for both orders)
  • 921 > Long order filled (doh!) ... yeah, we are in the wrong direction!
On an 18 minute chart, it would look like this:
  • 918 > Go long 1 contract @14.55
  • 929 > Order filled
  • 932 > Reverse position, sell 1, then sell short 1 contract @14.60

I assume you will get some feedback from TradeStation when your initial order is filled, and that you can capture this in your code . If so, then don't send off the sell until you are notified that the long was filled. The sell should be contingent on actually having a long position, not on assuming you do because you sent off the long order.

Will this work for you?

Bob.

When one door closes, another opens.
-- Cervantes, Don Quixote
Reply With Quote
Thanked by:
  #138 (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


bobwest View Post
I assume you will get some feedback from TradeStation when your initial order is filled, and that you can capture this in your code . If so, then don't send off the sell until you are notified that the long was filled. The sell should be contingent on actually having a long position, not on assuming you do because you sent off the long order.

Will this work for you?

Bob.

That is probably a brilliant solution if I can figure it out. I will think about this. With the longer timeframe, it might not matter any more, so I shall have to see.

For now....automated trading is not unattended trading. Thanks for the suggestion!

~vmodus

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #139 (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,041 since Dec 2013
Thanks Given: 4,375
Thanks Received: 10,192


vmodus View Post
Thanks! I'm currently using the Z 2020 contract, as it has the liquidity, which initially drew me to ED in the first place. Plus, I can trade the separate contracts if I want. I will have to keep an eye on TradeStation, but I don't generally hold overnight positions or do rollovers (yet at least).

In Tradestation you can backtest against EDZ20 easily but backtesting a constant time to maturity contract doesn't work. For example @ED=219XC+HMUZ should give you a chart of the 2nd contract in the HMUZ which is currently EDM20. If you chart that though you will see that the closing price yesterday was 98.29 which was the closing price for April!!!! This is not an issue related to overnight positions, more an issue that it's just giving you the wrong data. This was reported to Tradestation over two years ago but I guess so few people use it they don't care to fix it.

Also with regards to actually getting fills in Eurodollars you may want to check out this thread

Something similar is probably causing your VX fill issues although thats CBOE not CME and their matching engine is different.

Reply With Quote
Thanked by:
  #140 (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 missed my journal entry yesterday as I had some things to take care of at market close. Anyhow, the VX strategy on the 18 minute chart performed better (??), but not really. Again, I am seeing the problem with order fills. I had one order yesterday, short, then my reversal buy order was never filled, due to the fact that the price moved beyond before my limit order was filled.

I was eventually able to exit, but it took hours. Part of it was my fault, as I tried to adjust my exit, which of course threw me to the back of the queue for that limit price. There is one thing that may (or may not) have affected this strategy. It is the rollover period, meaning Tuesday was the last full trading day and Wednesday was the expiration day for the January VX contract. I'm not sure how people are doing rollover, but I'm wondering if that could have muddled things. It is just a thought, but I won't dwell on that too much.

Bottom line:
  • 1 trade, short, -$212
  • Strategy performance report: 6 trades, +382
  • I can't trade a strategy where orders aren't filled
  • This strategy won't work with this instrument, at least with a smaller account size (large account size I could place multiple orders, now I am limited to 1 with the margin requirements)
There is one final thing that I will explore with this strategy, which may be the final nail in the coffin to bury it. It may be possible to just take one direction trades, i.e. short only. I am going to sit on this idea for a day. It all comes down to fills and execution.

Next up:
The Eurodollar strategy has been sitting on the back burner, but it's time to bring it to the front. I will be looking trading this strategy on the December 2020 contract (EDZ20). This is a low risk and medium reward strategy which has potential. The expectancy for the prior two days is 17.00 and 20.66 for the month (through yesterday).

As a side note, I am struggling calculating expectancy (Van Tharp versus regular expectancy), so I am just using the calculation I know best:
Expectancy = (Probability of Win * Average Win) – (Probability of Loss * Average Loss)
That is all for now. I hope to update this later today once I see what I can do with the Eurodollar strategy.

~vmodus

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