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,965 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

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

End of Day
My strategy du jour, one my wife/trading partner developed and I enhanced (mainly with EOW logic), did well in sim today (she trades her version live). It started off with one bad trade, which was a coding error. I delay the start of my trading by 10-15 minutes on Sunday evening, to allow the normalization of the indicators. I forgot to add that condition to my entry logic.

Today's Results - sim
  • Positive P&L at close, trading MNQ
  • 1 open positions at close, positive
  • 5 round trip trades
  • 60% profitable
  • Overall profit factor 7.17
  • System efficiency: 22% (better than testing)
  • Execution errors: none
  • System errors: one (corrected)
One thing that I am looking at is slippage. My partner allows for a lot of slippage in analysis and backtesting (2-4 points per side), but I am more liberal (1-2 points per side). For today, slippage averaged 1 point per side. I will keep tracking this, as I want to make sure I am applying an appropriate value for slippage during my testing.

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

I did a little bit of work on Saturday looking at continuous contracts in TradeStation versus working with multiple individual historical contracts. I wanted to see how backtesting looked on continuous contract versus individual contracts. The 'unknown' for me was: when does TradeStation starting using the next contract? There are multiple methods (Sierra Charts gives you several choices for continuous data), but from what I saw, TS uses volume to determine when the next contract is to be used. I am only making an educated guess, but that is what I saw from the volume data.

For my experiment, this is what I used:
  • MYM (Micro E-mini Dow $5)
  • March, June and September contracts (2020)
  • Start trading the newer contract on the Sunday before the contract expiration date
Below are the equity curves using the same strategy, continuous contract (orange line) versus the individual charts using the rule above:

Continuous versus Individual Contracts


The two contracts tracked perfectly until the last 11 days of the March contract, then the continuous contract flipped to the June data which I was still on March with the individuals. The continuous contract did much better overall (it was about a $3k difference). In other words, using a volume based versus date based contract rollover performed better, at least in this case. The continuous contract also had fewer trades. This was only one instrument over 6 months, but I am guessing that volume based rollover is the way to go.

That was my lesson over the weekend. It was a very informative exercise.

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

Other than running the above strategy, I have been catching up on 'paperwork', mainly going through the strategies that have failed (there are lots), and doing the post-mortem documentation and archiving them. So, you know, boring stuff.

That's all for today.

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?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Better Renko Gaps
The Elite Circle
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
Exit Strategy
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
60 thanks
Funded Trader platforms
43 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #302 (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

End of Day
I kept running the same strategy as yesterday (in sim). It went well, despite some chop throughout the day.

Today's Results - Sim
  • Positive P&L at close, trading MNQ
  • No open positions at close
  • 18 round trip trades
  • 39% profitable
  • Overall profit factor 1.59
  • System efficiency: -21% (pretty bad)
  • Execution errors: none
  • System errors: none
I had one extra trade, which was likely an extra stop loss. I think we have a 'stop loss leak', probably due to my stop loss being too close. I had 18 trades, should have had 17. Slippage was minimal (less than 1pt per side), but that may be a result of using sim.

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

Dreams of VPS
I am currently looking to move our trading platforms to a VPS (virtual private server). One of our biggest risks right now is a potential outage (internet, power), and VPS nearly completely mitigates those risks. So we will probably move one of our installations online, then another. Since the VPS will primarily be used to run TradeStation, I have to determine the hardware specs for the VPS. It may seem boring (and it is), but as an algo trader, I need to assure that my TS platform is online and trading. For example, we had a 1 minute internet outage this afternoon. There is, essentially, no internet outage when running a VPS.

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

That is all for today. I had a bunch of other things going on today, so I have nothing else new to report. Have a great evening!

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


End of Day
I kept running the same strategy as I have all week, no changes (in sim). Today was a little bit wilder. I woke up being down, but it recovered well in the end. It is all a matter of execution, and allowing it to run uninterrupted.

Today's Results - Sim
  • Positive P&L at close, trading MNQ
  • 1 open positions at close, positive
  • 18 round trip trades
  • 26% profitable
  • Overall profit factor 1.06
  • System efficiency: -31% (bad)
  • Execution errors: none
  • System errors: none
Even though I am up for the day, it wasn't really the best day, as see from Profit Factor, % profitable and system efficiency.

Stop losses are still an issue and ate up a majority of profits. There were no extra trades today (hooray for that). The strategy report (what should have been) against the actual results was a little bit off (I lost more than I should have), but it was small and within a reasonable margin of error. It is likely due to some slippage. I am too lazy right now to calculate slippage, but I will do it later.

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

Right now the Trade Manager Analysis is wildly inaccurate. For the past 24 hours it is fine, but the data gets ugly earlier than that. There are duplicates, missing data, etc. Here is what it looks like (total Net should be positive...haven't had a losing day this week):

Trade Manager Analysis


As the kids say these days, whatevs. I am guessing this is just the nature of sim data, but I have issues with the live data too. At some point I will build a database to house our trade data and do our own analysis.

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

In MultiCharts news...
I have been running some tests in MC on an Oanda practice account, just to get a feel for the Auto Trading component (equivalent to Strategy Automation in TradeStation). Things are a lot different in terms of setup and automation, so my dear wife/trading partner helped me with my setups. I was getting duplicate orders placed and things out of whack. Hopefully I have some good results (meaning accurate, not necessarily profitable).

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

That is all for now my friends. See you on the other side!

~vmodus

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

End of Day
I kept running the same strategy as I have all week, no changes (in sim). There were a lot of trades today. Plenty of stop losses, but that is to be expected at this point. Everything ran perfectly.

Today's Results - Sim
  • Positive P&L at close, trading MNQ (4 days in a row!)
  • 1 open positions at close, flat
  • 26 round trip trades
  • 21% profitable
  • Overall profit factor 1.02
  • System efficiency: -38% (really bad)
  • Execution errors: none
  • System errors: none
The good trades easily offset the bad trades. All metrics are bad except the one that really matters, which is total P/L, which was good by any measure.

Stop losses are still an issue and ate up a lot of profits, but that is something to be worked on in the future. One of the filters we use is Parabolic SAR, which generates a lot of early exits. The strategy actually did better in sim when compared to the strategy report. Overall, the four days appear to be tracking well.

Here is one stretch of 6 consecutive stops:



Stops and efficiency must be improved (fixing the former will improve the latter). Due to these two metrics, I feel like this strategy is very shaky, though through a myriad of back and forward testing, it is working well.

The one thing I am very happy with is that the strategy is tracking what it should be doing. The only issues I have had were self-inflicted injuries. This is only sim, but my wife/trading partner is trading this live (different timeframe) and it appears to be working for her.

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

I am currently reading Trading Chaos 2ed, by Bill Williams and Justine Gregory-Williams, from the start (I skipped right to the technical stuff when I first got it). They discuss the non-linear nature of the markets and why chaos theory is useful in analyzing and understanding the markets. Here is an interesting quote from the introduction:


Quoting 
The market is a creature of chaos -- a far from equilibrium soup simmering on the uneven flame of trader psychology.

It is very interesting reading and I'm sure I will glean value from it. Good stuff.

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

That is all for today. Hopefully the strategy finishes the week with a win.

~vmodus

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

End of Day
I kept running the same strategy as I have all week, no changes (in sim). Today was hot hell for the most part. Everything ran perfectly, however, algorithmically speaking.

Hot Hell


Today's Results - Sim
  • Negative P&L at close, trading MNQ (1st losing day of the week)
  • No open positions at close; I don't hold over the weekend with this strategy
  • 26 round trip trades
  • 19% profitable
  • Overall profit factor .83
  • System efficiency: -26% (bad)
  • Execution errors: none
  • System errors: none
Stops killed me today, but I was able to catch the final run of the day, which recouped a lot of my earlier losses. No complaints, really, as the system functioned as intended.

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

End of Week
  • Positive net profit, trading 1 contract of MNQU20 all week (sim), same strategy with no changes
  • 101 round trip trades
  • 27.7% profitable
  • 1.41 Profit factor
  • -44% System efficiency (ugh)
The week was very good with respect to P/L, even though the numbers above do not reflect it. There were big wins to offset lots of small losers, mostly the stop losses. Four winning days and one losing day was okay.

This week was the test for my latest end of week exit (specific to a Renko chart). It performed flawlessly, exiting right after 1630 ET as expected and not re-entering a new position.

The strategy performed worse than expected overall, but this is partly due to the execution errors. However, there were additional stop losses that occurred. We need to clean that up.

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

VM
I setup a virtual machine (VM) on Azure this morning. We currently have a Microsoft business account, so it was super easy, as they suggested it would be. It took me about 30 minutes to setup, though most of it was just understanding my configuration options. I installed TradeStation desktop on the minty fresh VM and had my strategy up and running quickly, with virtually no disruption.

The goal here is to run our algorithms on a virtual machine, which will help mitigate issues with internet outages, power outages, and other unseen events that can affect traders in our position. You can check out these threads if you want more info on our configs:




For what it is worth, Microsoft offers the VM free (within reasonable limit) for a while (they say 12 months). So we can use this for now without any more risk than if we were using our own PC's.

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

MultiCharts
I ran a strategy this week in MC, just to get a feel for it. It is a losing strategy, but I knew that and I am only using it against the Oanda practice account. I've learned some of the things I can and cannot do. I will run this more next week. It has performed flawlessly.

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

Next Week
I have a bunch of things to do next week. Here is what is on tap trading-wise:
  • I will run VM sim all week
  • Run multiple strategies on the VM to stress test the system
  • Do some analysis on my alligator-fractal strategy (not quite dead, yet)
  • Run strategies on MultiCharts to better understand the nuances and differences between TradeStation and MultiCharts
~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~ + ~

Have a great weekend, stay safe, and be a good neighbor/citizen and wear a mask. Even my avatar wears a mask.

~vmodus

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

Wow, what a day. So I am currently stress testing the virtual machine (VM) that will eventually house our live trading strategies. I am running 6 instruments with automated strategies in simulation:
  • E7U20 (Euro FX)
  • M2KU20 (Micro Russell 2000)
  • MNQU20 (Micro NQ)
  • MESU20 (Micro ES
  • QOQ20 (miNY Gold)
  • ESU20 (ES)
Everything was okay, but there were a few issues:
  • Execution error: I used the wrong bar settings for ES, so I had a bunch of bad orders in the first 6 hours of trading (last night)
  • VM killed TradeStation: this happened right as I relaunched the VM this morning. It ran overnight with no problem, but TS did not just crash. It was like it wasn't running at all. Anyhow, I quickly relaunched and no damage was done.
I was able to see a more blended portfolio, which is where we are headed. The day was up and down, but we ended profitably. Efficiency was about -8%, which isn't horrible. Profitability was 39%. This is less important than the stress test. The CPU usage was about 10% on average. So far, so good.

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

ES versus MES
Interesting things happen when you do experiments, the most interesting thing to me was the performance of ES versus MES. Now, I would not even try to trade arbitrage between these two, but I observed a huge variance on one particular trade. The charts were identical in bar size (Renko), identical data start dates and identical strategies.
  • MES: Short entry @ 3213.5 / exit @ 3150.75 >> +62.75 points
  • ES: Short entry @ 3200.75 / exit @ 3149 >> +50.25 points
MES looked really good against ES for one trade, but actually outperformed ES for the entire day. I have an ES versus MES test scheduled for later this week. I will take 10 MES against 1 ES for one day and see how they perform.

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

Random Analysis with Oscillators
I am reading Trading Chaos 2ed by the late great Bill Williams, and he got me thinking about oscillators. For the record, I hate oscillators and do not find them useful in my trading.

I was thinking, maybe wrongly, that oscillators should spend about an equal amount of time between various points of the center line (50). I know this is Gaussian thinking and maybe way off-base, but bear with me. If a sine wave (everyone's favorite oscillation) oscillates at the same frequency, then it spends exactly have of its time above and half of its time below the center line. Do oscillators follow?

I took 2 years of CL data (60 minute chart), applied RSI and Slow Stochastics indicators, and this is what I got, on average:



I used CL because it is a physical commodity and has a better price balance than an index. RSI was just about spot on 50. Stochastics were skewed toward oversold. I did an earlier test and came to the same conclusion with a different instrument. This makes me think that if I were to use stochastics (or any oscillator, I suppose), I may need to adjust my center line and my overbought and oversold line accordingly.

As an algo trader, that may be important. Or not.

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

I'm done for the day. I am very happy with my results over the past two weeks. I have to keep plugging away.

~vmodus

~vmodus

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

I am adding a seventh instrument to my stress test tonight: NQU20. It will be a new (to me) strategy developed by my dear wife/trading partner.

~vmodus

~vmodus

Enjoy everything!
Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote
Thanked by:
  #308 (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 what 7 instruments running at the same time look like:
Position Bar


CPU Utilization for 7 Automated Strategies on TradeStation


~vmodus

~vmodus

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

First update...Happy little accident
As I mentioned yesterday, interesting things can happen when you do experiments. The most pleasant surprise is the performance of Euro FX (E7U20) on one of my fractal strategies. Right now it has a 100% win rate, though there have been 3 round trip trades. This is one of my strategies that does not require optimization; it either works with a given instrument and bar interval, or it doesn't. In this case, it does.

Here is what it looks like since Sunday night:



E7 was not part of my initial group of instruments (it probably should have been). Backtest results (all unseen data) look good for this instrument. As the late great Bob Ross might say, 'its a happy little accident'.

To be continued....

~vmodus

~vmodus

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


Second update....

I am still chugging along with my VM testing. There have been no failures and TS did not 'disappear' like it did yesterday morning. I save my desktop and workspaces regularly in case I need to quickly restart. 7 instruments run well with only about 11% CPU utilization. Even when I apply a new indicator or reload data, CPU usage will momentarily spike, only to return to normal.

I am starting to pay attention to memory usage. Here we are using 46%:



Today ended with a loss for the 7, but that is not really the purpose of this exercise (open position P/L is positive). Positive for the week. Total system efficiency (entries and exits) is at 0 (zero) which is pretty good. Gold miNY (QOQ20) has been a drag on the account.

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

MES v. ES
I'm running this test starting at the open. I will run 10 contracts of MES and 1 of ES and see how closely they track. ES should fare slightly better just because of the commission advantage, but we shall see at the end of Wednesday where they both stand.

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

That is all. I have some client work this week (newly awarded), so I will probably be busy until Friday with that. Thankfully the robots do most of the trading work (at least this week).


~vmodus

~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