Fully automated futures trading

Oh we're doing this are we...so you've unilateraly decided it's time for a performance update.... whose thread is this exactly again??!?

:-)

I don't really look at calendar years, and certainly not at half calendar years, and can never get these images to work, they used to, but here goes:

r46SDLGC68wp4VKx7


https://photos.app.goo.gl/r46SDLGC68wp4VKx7

P&l Jan to June was +4.1%
I guess that's 8.2% if you 'time weight'

Highlights

24 VIX 1.01
25 NASDAQ_micro 1.32
26 CORN 1.46
27 CAC 3.26
28 SMI 4.21
29 SOYBEAN 4.86


Lowlifes

0 EDOLLAR -3.64
1 JPY -2.15
2 OAT -1.31
3 PLAT -1.07
4 US10 -1.02


Code:
========================================
Risk per strategy, annualised percentage
========================================

                       risk
medium_speed_TF_carry  12.1


==================================================================================================================================================================================================================================================================
                                                                                                                         Instrument risk                                                                                                                        
==================================================================================================================================================================================================================================================================

              daily_price_stdev  annual_price_stdev    price  daily_perc_stdev  annual_perc_stdev  point_size_base  contract_exposure  daily_risk_per_contract  annual_risk_per_contract  position   capital  exposure_held_perc_capital  annual_risk_perc_capital
LEANHOG                     1.9                31.1    100.2               1.9               31.0            288.7            28938.5                    561.4                    8983.1      -1.0  385183.5                        -7.5                      -2.3
VIX                         0.5                 7.6     19.5               2.4               38.8            721.8            14075.9                    341.2                    5460.0      -1.0  385183.5                        -3.7                      -1.4
AUD                         0.0                 0.1      0.8               0.5                8.8          72183.9            54347.3                    298.4                    4774.6      -1.0  385183.5                       -14.1                      -1.2
V2X                         0.6                 9.6     19.1               3.1               50.3             85.7             1636.4                     51.4                     822.8      -4.0  385183.5                        -1.7                      -0.9
BITCOIN                  1944.6             31113.0  33635.0               5.8               92.5              0.1             2427.9                    140.4                    2245.9      -1.0  385183.5                        -0.6                      -0.6
BOBL                        0.1                 1.7    134.1               0.1                1.3            856.7           114921.7                     92.5                    1480.0       1.0  385183.5                        29.8                       0.4
KR3                         0.1                 1.7    110.0               0.1                1.5            638.6            70251.2                     67.7                    1082.5       4.0  385183.5                        73.0                       1.1
CAC                        38.8               620.3   6568.5               0.6                9.4              8.6            56274.3                    332.2                    5314.5       1.0  385183.5                        14.6                       1.4
WHEAT                      12.4               198.9    660.0               1.9               30.1             36.1            23820.7                    448.7                    7178.7       1.0  385183.5                         6.2                       1.9
NASDAQ_micro              109.5              1752.1  14700.5               0.7               11.9              1.4            21222.8                    158.1                    2529.5       3.0  385183.5                        16.5                       2.0
KOSPI_mini                  3.0                48.1    437.5               0.7               11.0             31.9            13971.7                     96.0                    1535.8       5.0  385183.5                        18.1                       2.0
GAS_US_mini                 0.1                 0.9      3.7               1.5               23.5           1804.6             6600.3                     97.1                    1554.3       5.0  385183.5                         8.6                       2.0
SP500_micro                26.0               416.0   4338.2               0.6                9.6              3.6            15657.6                     93.8                    1501.5       6.0  385183.5                        24.4                       2.3
AEX                         4.4                71.0    734.0               0.6                9.7            171.3           125776.4                    760.7                   12172.0       1.0  385183.5                        32.7                       3.2
EDOLLAR                     0.0                 0.7     98.8               0.0                0.7           1804.6           178249.2                     80.9                    1294.7      10.0  385183.5                       462.8                       3.4
CRUDE_W_mini                0.6                 9.7     73.2               0.8               13.3            360.9            26437.4                    219.3                    3508.3       4.0  385183.5                        27.5                       3.6
 
Oh we're doing this are we...so you've unilateraly decided it's time for a performance update.... whose thread is this exactly again??!?
:D
It's ok folks, he mentioned on that podcast he's going on vacation soon, there's gonna be anarchy here. We'll post PnL's every day and curve fit everything.

On a more serious note, what do you mean by "time-weighted"? I mean this as described here https://www.investopedia.com/terms/t/time-weightedror.asp
I do this because I don't know how else to compute returns if there are deposits/withdrawals, which is still do regularly.
 
:D
It's ok folks, he mentioned on that podcast he's going on vacation soon, there's gonna be anarchy here. We'll post PnL's every day and curve fit everything.

On a more serious note, what do you mean by "time-weighted"? I mean this as described here https://www.investopedia.com/terms/t/time-weightedror.asp
I do this because I don't know how else to compute returns if there are deposits/withdrawals, which is still do regularly.

Oh I'd call that the IRR: internal rate of return. My capital employed already accounts for deposits and withdrawals, so effectively it's always an IRR.

For me time weighted is the CAGR, which since I don't compound is just return*365/D where D is the daycount fraction.

GAT
 
Now I'm big time confused (disclaimer: I know 0 financial lingo).

I looked into that and what's called IRR here https://www.investopedia.com/terms/m/money-weighted-return.asp is Money-Weighted return.

For me time weighted is the CAGR, which since I don't compound is just return*365/D where D is the daycount fraction.
Here's an example:
You start the year with 300K (imagine your max account limit, "the cap" is 500K, so you will be compounding until you hit that, right? I know you call that half-compounding, I do the same).
On April 1st, you're at 350K.
Then you deposit 50K, so now you have 400K total.
On July 1st, you're at 450K.

With your calculation there, and assuming deposit is accounted for in capital, the return is (450K-350K)/350K * 2? 2 coming from D being 182/3.
I guess where I'm confused is that you had 50K returns in the first 3 months and 50K in next 3 months, but you started first 3 months with less capital, so return has to be higher than the next 3 months, that has to be accounted for somewhere.
 
:D
It's ok folks, he mentioned on that podcast he's going on vacation soon, there's gonna be anarchy here. We'll post PnL's every day and curve fit everything.

On a more serious note, what do you mean by "time-weighted"? I mean this as described here https://www.investopedia.com/terms/t/time-weightedror.asp
I do this because I don't know how else to compute returns if there are deposits/withdrawals, which is still do regularly.
I'm always unsure what to use as the divisor when calculating return. Currently when I'm plotting curves I'm using the "current base capital" at that particular point. Where "current base capital" is my configured system-capital(e.g. $200k) minus current drawdown. So because it's different at every point in time, for every return point I'm using current base capital at that particular point.
I guess alternatives could be to use the constant system-capital (e.g. 200k) at every point, or median value of the "current base capital".. Using notional exposure as divisor doesn't seem correct..
But that is for the curve in my report. When I said "I'm 10% up from start" it simply meant that I started with 200k(more than a year ago) and currently I have 220k. (which also isn't exactly correct because I added capital in the middle, but sort of close enough :) )
 
Last edited:
I'm always unsure what to use as the divisor when calculating return. Currently when I'm plotting curves I'm using the "current base capital" at that particular point. Where "current base capital" is my configured system-capital(e.g. $200k) minus current drawdown. So because it's different at every point in time, for every return point I'm using current base capital at that particular point.
I guess alternatives could be to use the constant system capital (e.g. 200k) at every point, or median value of the variable base capital.. Using notional exposure as divisor doesn't seem correct..

I also use (Max Capital - current drawdown) as my divisor, because that's what my system is using to calculate exposures. The reason I use that is I'm not compounding. For most people it's fine to use the current system account value, because they are also using that as their figure for exposure. If they add money to the account, they want the exposure to go up, which means a higher divisor for percentage p&l calculations; similarly if you withdraw or lose money you want your exposure to go down, blah blah blah.

GAT
 
upload_2021-7-8_20-1-13.png


this looks like a useful little device for those of us with physical hardware, I'm ordering a couple for myself. Should be pretty easy to operate from Linux, just keep sending ASCII-encoded timeout to the usb port and it will wait that timeout before mechanically shorting reset wires, unless a new timeout value arrives before..
 
View attachment 262937

this looks like a useful little device for those of us with physical hardware, I'm ordering a couple for myself. Should be pretty easy to operate from Linux, just keep sending ASCII-encoded timeout to the usb port and it will wait that timeout before mechanically shorting reset wires, unless a new timeout value arrives before..

Sorry I'm probably being dumb, what's the use case for this?

GAT
 
Sorry I'm probably being dumb, what's the use case for this?

GAT
It's a hardware watchdog, it automatically (physically) reboots your computer if it freezes (e.g. if you're physically not around for a long time to do it yourself, i.e. the machine could freeze completely so you can't reboot it with a command remotely). Looks like crypto miners use them. (and I think Mars-rovers have them too, to reboot the thing if it freezes :) )
The basic idea is you have to keep sending "ping-commands" to it from a script running on your computer every x-minutes, indicating that your machine is still operational, and if the watchdog doesn't receive another signal before the configured timeout it PHYSICALLY resets your machine by connecting reset or power contacts using it's relay. So it has to be connected to USB for power and communication (sending these ping-notifications to it) and also to the reset (and optionally power) contacts on the motherboard (the same contacts that the physical reset and power buttons on the computer case are connected to internally).
You can also get creative with these ping notification scripts, so don't just send ping-notifications to the device unconditionally (that only monitors a complete PC freeze) , but also check some important conditions on the machine and if they aren't satisfied anymore don't send the ping to the watchdog and it will reboot the machine. e.g. you can keep trying to access google in a loop and if the response didn't come, that means the machine lost internet connection and you might want to reboot it., that way you don't just control if the computer isn't frozen but also if it still has internet connection (or some other condition).. A software reboot in this case might be enough, but in some cases, e.g. if the machine is frozen solid, it has to be physically rebooted and that's what these devices do..
(I guess it can introduce another risk, like if the watchdog itself goes bananas and starts continuously rebooting your PC, but I hope they are simple and reliable enough..)
 
Last edited:
Back
Top