Forum Replies Created
-
AuthorPosts
-
BenOsbornParticipant
Hey Gareth,
Just sent. If you want me to run you through anything just let me know, more than happy to help out.
ChatGPT is definitely my friend when it comes to these things!
Cheers,
BenBenOsbornParticipantHi Gareth,
I have a pretty simple spreadsheet I use for a quick check. I have automated some of it with a python script and now the whole process takes a couple of minutes. Funnily enough I just started fully automating the process yesterday (yet to finish) and have now seen your post.
The semi-automated version is that I download the daily report from IB and then run a python script. The script does all of the work using pandas, grouping together transactions that took place in multiple transactions, shorts the longs and shorts, assigns them to the right strategy if more than one strategy traded the same symbol, calculates the P&L and then inserts them into the appropriate spreadsheet columns of the spread sheet and saves it. It then converts them into the right format to go into a separate Trade List spreadsheet for realtest to run went I want to replay trades and saves that. The script takes 2 seconds to run, the longest part is logging into TWS and hitting download today’s trades.
For the backtest side I was doing that manually and copying across but yesterday created a script to run it automatically each morning at 6:20am (i’m in Perth). If Norgate hasn’t published the data it will check back every 30 minutes and then automatically run the backtest when the status says published. In the next couple of days I will finish automating the whole thing so I just have to open the spreadsheet and run my eye over the missed trades (which doesn’t happen that often these days). I have just been lazy since automating the first part took the process from up to 30 mins or more depending on the number of trades down to 5 mins max.
Happy to share the scripts if you want to take a look (don’t expect anything too professional though!)
BenOsbornParticipantLook’s like I am going to go against the flow of everyone else and have a negative month. It was a lot worse after the election but recovered. I beat my backtest a little at least with some better fills.
November 2024 Performance
US
Combined MOC -7.84%
Schwing (semi – discretionary) – No trades taken (life has been busy) – Whilst this was doing ok I just don’t have the timeI have spent a lot of time over the past couple of months working on other systems to try and move away from having all of my eggs in the one MOC bastket (albeit it is numerous long and short MOC strategies combined). I am yet to get to a point where I am happy with the systems but have enjoyed the research and testing.
Edit: I almost forgot, I have been trying to get my kids interested in investing so developed an All Weather System for them so it is only the monthly rebalance. I haven’t tracked the monthly stats but it is up +6.23% in the two months it has been running. I have only put a small amount in each of their accounts but will continue to contribute and encourage them to also. Would have been better off moving my account into it!
BenOsbornParticipantJust goes to show that what is in your mind is not always correct. Now that I have run the numbers, while the shorts did get hammered after the election they were what recovered over the last week to roughly halve my max drawdown throughout the month.
BenOsbornParticipantFunny, my shorts had the worst month ever, I got creamed daily after the election. Only started to recover a little from this week but I expect I am still going to be down a decent amount when I run the numbers for the month.
Nice result on MR2000.
BenOsbornParticipantSorry to hear about your mum. I had a friend’s father develop a brain tumor (undiagnosed for a long time) and pass away. Finances were in a mess also and it was clear he hadn’t been thinking straight for a while.
BenOsbornParticipantOctober 2024 Performance
US
Combined MOC +0.65%
Schwing (semi – discretionary) – No trades taken (life has been busy)BenOsbornParticipantSeptember 2024 Performance
US
Combined MOC -2.8%
Schwing (semi – discretionary) – No trades taken (life has been busy)The issue with the Real Test order cut-off time cost me about 1.75% in gains before I figured out what was going on. At least I make sure I double check that every night now!
BenOsbornParticipantI think MOC orders need to be placed by 15:45 or 15:50 (and can’t be modified after that) so 15:40 to be safe.
BenOsbornParticipantMarsten posted an updated file here Orders – adjusting “good until time” for day trades – Questions – RealTest User Forum (mhptrading.com) if you don’t want to adjust yourself. Just replace the one that is in your realtest folder with this. I had no problem with my orders friday after this.
BenOsbornParticipantTurns out all my trades were only good to 13:30. I have just checked my orders file and IB is correct, good til 13:30. I was just looking on the realtest site on how to change it and Marsten has included an updated ExchangeMap file on someone’s post.
Costly error. Never goes the other way,
BenOsbornParticipantYes, they were shorts. I spoke to IB but I was in the office so didn’t have all the trade details. I gave them one that I remembered and they said that they couldn’t see any reason why it didn’t fill.
They have raised a ticket on that one to start so I will let you know how it goes.
BenOsbornParticipantIs there a way that you can see why orders didn’t trigger in IB? Last night only 12 out of 22 (in the backtest) triggered and I am not sure why. All I can think of is it was a margin issue but it shouldn’t have been.
BenOsbornParticipantAugust 2024 Performance
US
Combined MOC +8.7%
Schwing (semi – discretionary) – No trades takenI have made a few changes lately brought on by some observations in my results compared to the backtest over time.
TradeStation has less trades stocks available with full leverage compared to IBKR and the list changes daily (called a Special Margin List). Each day I would have to download the list and exclude them from my universe of stocks before I ran my orders for each system. Since I started a couple of years ago, this list has grown from about 6500 stocks to exclude up to somewhere in the 9000s.
This didn’t really appear to be a big deal on the surface. In general, my monthly results in the past were fairly similar to the backtest (in terms of % gain or loss) even though the list of stocks to exclude changed daily. Running 10 or 20 year backtests with random copies of the exclude list were always profitable and didn’t show large changes in drawdown or CAGR (although they were not as good as not having to use the list).
However, this year I started to notice some discrepancies that were outside my tolerance level. As an example, one month I got hit with some sizeable losses on a few different stocks. The daily backtests matched but at the end of the month my live trading showed roughly -2.5% whilst the backtest was roughly +4%. The main reason for the difference was that these stocks had been moved onto the special margin list after the big losing days and didn’t show in the backtest.
I quickly lost a lot of confidence in the backtests using a changing special margin list. Sure it appeared as though everything balanced out over time but what if it started to hide things more often with the increasing numbers of stock on the list? It was really bothering me that it didn’t match (or closely resemble at least).
So I thought it is pretty rare that my system would enter all 40 positions (average is 12) so I would try not using the special margin list and see how often I ran out of margin because of the stocks not using full leverage. It ran ok for a while, there were only a couple of occasions when I ran out of margin. Backtests matched a lot closer. Then a big day came. I could only enter 13 positions out of the 36 that entered in the backtest because I ran out of margin as all of the stocks had less leverage leverage at TradeStation. The difference was 13% on the day in live trading compared to 28% in the backtest (days like this are rare).
I thought I can’t handle these discrepancies in my backtest to live trading so I need to change broker. Whilst I couldn’t previously use IBKR for leveraged systems I found out that I was now able to so I have moved across to IBKR part way through this month. It has been smooth sailing since (knock on wood).
Some of the other changes I have made more recently is that I upped my liquidity filter a lot. I found one of the other reasons my results could differ were stocks entering on the backtest whereas in real life I wasn’t getting filled as there were very little shares available at my price, if it even traded there at all (some of those trades where there is a random 100 shares trading somewhere below your limit order and it never really trades near your price).
I have also added some new short and long systems trying to bring down the drawdown correlations overall.
BenOsbornParticipantThanks Scott.
It is just super simple at the moment. Buy limit with ATR stretch off the low and when I put a stock trend filter on for the second RUT version I have just used C > 200 MA.
-
AuthorPosts