Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (M_D, AndrewAMD, Quad, Ayumi), 806 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 10 of 20 1 2 8 9 10 11 12 19 20
Re: One Night Stand System [Re: jcl] #456636
12/02/15 00:16
12/02/15 00:16
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
IIRC optimising the start time suggested that UTC (i.e. no offset) start time was the most robust, so I will leave it like that on the Zorro 1.32 version.

Incidentally I backtested the original unoptimised script and in 2015 so far it has performed really well. Considering this would be more 'out of sample' data it adds evidence for the hypothesis that is a good system for decent returns whilst keeping capital deployed for regular but short time periods.

BackTest ONS Portfolio portfolio

Simulated account AssetsFix.dta
Bar period 24 hours (avg 2028 min)
Test period 02.01.2015-02.12.2015 (238 bars)
Lookback period 40 bars (8 weeks)
Monte Carlo cycles 200
Assumed slippage 10.0 sec
Capital invested 50000$

Gross win/loss 40797$ / -12491$ (+2436p)
Average profit 30955$/year, 2580$/month, 119$/day
Max drawdown -2461$ 9% (MAE -2461$ 9%)
Total down time 59% (TAE 8%)
Max down time 5 weeks from Apr 2015
Max open margin 7676$
Max open risk 7301$
Trade volume 9002053$ (9844311$/year)
Transaction costs -724$ spr, 0.00$ slp, 0.00$ rol, -325$ com
Capital required 12133$

Number of trades 81 (89/year, 2/week, 1/day)
Percent winning 62%
Max win/loss 6338$ / -2011$
Avg trade profit 349$ 30.1p (+70.2p / -34.7p)
Avg trade slippage 0.00$ 0.0p (+0.0p / -0.0p)
Avg trade bars 1 (+1 / -1)
Max trade bars 1 (24 hours)
Time in market 34%
Max open trades 5
Max loss streak 4 (uncorrelated 5)

Annual growth rate 63%
Profit factor 3.27 (PRR 2.38)
Sharpe ratio 2.43
Kelly criterion 9.55
R2 coefficient 0.851
Ulcer index 4.1%
Prediction error 64%

Confidence level AR DDMax Capital

10% 281% 1834$ 10997$
20% 281% 1834$ 10997$
30% 281% 1834$ 10997$
40% 277% 1935$ 11180$
50% 268% 2133$ 11539$
60% 261% 2318$ 11875$
70% 239% 2904$ 12937$
80% 228% 3252$ 13567$
90% 215% 3711$ 14397$
95% 207% 4011$ 14942$
100% 163% 6273$ 19038$

Portfolio analysis OptF ProF Win/Loss Wgt%

EUR/JPY avg .1000 1.03 3/3 0.1
EUR/USD avg .1000 2.62 11/3 17.1
GBP/USD avg .1000 3.75 5/3 5.9
GER30 avg .1000 10.10 9/4 72.2
USD/CAD avg .1000 0.98 6/5 -0.1
USD/CHF avg .1000 4.19 5/5 2.1
USD/JPY avg .1000 0.68 4/5 -3.5
USOil avg .1000 5.30 7/3 6.2

EUR/JPY .1000 1.03 3/3 0.1
EUR/JPY:L .1000 0.00 0/1 -1.2
EUR/JPY:S .1000 1.42 3/2 1.3
EUR/USD .1000 2.62 11/3 17.1
EUR/USD:L .1000 0.52 2/3 -5.1
EUR/USD:S .1000 ++++ 9/0 22.3
GBP/USD .1000 3.75 5/3 5.9
GBP/USD:L .1000 0.00 0/1 -1.7
GBP/USD:S .1000 17.81 5/2 7.6
GER30 .1000 10.10 9/4 72.2
GER30:L .1000 7.58 7/3 47.8
GER30:S .1000 37.41 2/1 24.4
USD/CAD .1000 0.98 6/5 -0.1
USD/CAD:L .1000 1.64 6/4 2.3
USD/CAD:S .1000 0.00 0/1 -2.4
USD/CHF .1000 4.19 5/5 2.1
USD/CHF:L .1000 6.95 5/4 2.4
USD/CHF:S .1000 0.00 0/1 -0.3
USD/JPY .1000 0.68 4/5 -3.5
USD/JPY:L .1000 3.08 4/2 5.1
USD/JPY:S .1000 0.00 0/3 -8.7
USOil .1000 5.30 7/3 6.2
USOil:L .1000 1.52 1/1 0.2
USOil:S .1000 6.59 6/2 6.0

Re: One Night Stand System [Re: RTG] #456641
12/02/15 14:48
12/02/15 14:48
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
nice job RTG!

Re: One Night Stand System [Re: MatPed] #456662
12/02/15 22:39
12/02/15 22:39
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Thanks but Sphin has coded and debugged most of it along with JCL. I initially wanted to backtest a strategy from a pdf I had.

Re: One Night Stand System [Re: RTG] #456665
12/02/15 23:07
12/02/15 23:07
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
ok, so nice teamwork! I'd like to see the final version of the code. It would be helpful

Ciao

Last edited by MatPed; 12/02/15 23:09.
Re: One Night Stand System [Re: MatPed] #456685
12/03/15 23:59
12/03/15 23:59
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Only a litle team but at least a team. I guess there is no final code in the meaning of the one and only version. I played with optimizing periods for the different SMAs just like restricting the buy/sell conditions and varying the assets but comparing the different versions over a period of 3-4 years the results are at least similar. The optimized versions may have performed with less DD and lower margins & risks partially on the expense of the result, but the 'raw version' had especially in 2015 a strong performance and is surely less biased than the revised ones.

Re: One Night Stand System [Re: Sphin] #456686
12/04/15 01:06
12/04/15 01:06
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Incidentally I can confirm that setting the BarOffset has got the script to work on my Zorro 1.34.

Re: One Night Stand System [Re: RTG] #456722
12/07/15 00:57
12/07/15 00:57
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
Sphin, did you have a profitable exit this morning on USOil?

Re: One Night Stand System [Re: RTG] #456723
12/07/15 01:12
12/07/15 01:12
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Yes I had:

[USOil::S8281] Cover 5@39.58: +11.49 at 00:01

Re: One Night Stand System [Re: Sphin] #456736
12/07/15 14:16
12/07/15 14:16
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
It would have been good to stay on this down the current price of 38.60.

Re: One Night Stand System [Re: RTG] #456773
12/09/15 00:49
12/09/15 00:49
Joined: Feb 2014
Posts: 181
R
RTG Offline OP
Member
RTG  Offline OP
Member
R

Joined: Feb 2014
Posts: 181
I just realised the Margin formula for the optimised version was producing a CAGR of about 40%.

Margin = 0.1 * OptimalFLong * Capital;

Changing it to a compounding version produced a CAGR of 95%. I changed both short and long versions to include compounding equity.

Margin = 0.1 * OptimalFLong * (Capital + WinTotal-LossTotal);

Now is optimalF already doing the compounding as it were as I noticed that the lot sizes go up with equity increases over time? Is introducing the additional WinTotal - LossTotal a form of over optimisation?

Last edited by RTG; 12/09/15 00:57.
Page 10 of 20 1 2 8 9 10 11 12 19 20

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1