Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (TipmyPip, AndrewAMD, Quad, aliswee, degenerate_762), 970 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: The Financial Hacker [Re: jcl] #455704
10/28/15 02:05
10/28/15 02:05
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline
Senior Member
boatman  Offline
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
jcl, love your post about the Cold Blood Index. I posted a comment there, but will post it here for the Zorro community as well. Let me know if you'd prefer future comments to be posted to the financial hacker site only.

My comment:

Great post and thank you for sharing. I was looking for a solution like this recently in order to objectively decide when to pull out of a strategy. I settled on a modification of your second example, where an allowance is made for the drawdown to grow with time. The modification I made was to use the confidence intervals for the maximum drawdown calculated by Zorro’s Monte Carlo engine rather than the maximum drawdown of the backtest. The limitation is that we don’t know the confidence intervals for the maximum drawdown length – only the maximum drawdown depth. I used the maximum drawdown length calculated for the backtest and considered where the backtest drawdown depth lay in relation to the confidence intervals calculated via Monte Carlo to get a feel for whether it was a reasonable value.

I like your Cold Blood Index a lot. It is more meaningful than the approach I used, but it does suffer from a similar drawback – that is, being a function of the balance curve in the backtest. If you accept that the balance curve obtained in the backtest is one possible outcome amongst an infinite number of possibilities due to the random nature of individual trade results, then the result obtained with the Cold Blood Index is likewise one possible outcome amongst many.

(As an aside, this condition can be validated by examining the autocorrelation of the backtest returns series with various lags using either Zorro, R or some other statistical tool. Nearly every strategy I’ve experimented with, and definitely the few that I’ve taken live, have all shown statistically insignificant return autocorrelations).

I think your (fantastic) idea of the Cold Blood Index could be improved by incorporating the algorithm into a Monte Carlo routine that creates many unique balance curves by randomly sampling the backtested trade results, and running it separately on each curve. Obviously the computation time would become significant, so the additional effort would only be worth it having confirmed that the returns series exhibits statistically insignificant autocorrelation.

Is this something that would be possible with Zorro, or do you think it would be a more efficient use of time to attempt it directly within R?

Thanks for sharing your research. I learn a lot from every post.

Re: The Financial Hacker [Re: boatman] #455763
10/29/15 10:10
10/29/15 10:10
Joined: Jul 2013
Posts: 75
R
royal Offline
Junior Member
royal  Offline
Junior Member
R

Joined: Jul 2013
Posts: 75
Yes, works with the beta version. Thanks! laugh

Re: The Financial Hacker [Re: royal] #458594
03/21/16 19:10
03/21/16 19:10
Joined: Mar 2015
Posts: 336
Rogaland
N
nanotir Offline
Senior Member
nanotir  Offline
Senior Member
N

Joined: Mar 2015
Posts: 336
Rogaland

Last edited by Nanitek; 03/24/16 09:35.
Re: The Financial Hacker [Re: nanotir] #462137
09/11/16 16:23
09/11/16 16:23
Joined: Apr 2016
Posts: 38
madpower2000 Offline
Newbie
madpower2000  Offline
Newbie

Joined: Apr 2016
Posts: 38
Trying to reproduce results from last article:

http://www.financial-hacker.com/build-better-strategies-part-5-developing-a-machine-learning-system/

But my equity curve and result are different:

http://imgur.com/a/xRrf0

Any suggestion what did I miss??

Last edited by madpower2000; 09/12/16 18:10.
Re: The Financial Hacker [Re: madpower2000] #462746
10/24/16 20:29
10/24/16 20:29
Joined: Aug 2016
Posts: 61
D
dr_panther Offline
Junior Member
dr_panther  Offline
Junior Member
D

Joined: Aug 2016
Posts: 61
I found a very interesting technique to multiply trade variations on your blog, but I don't get it right, please can you tell me, what I am doing wrongly.

My expectation based on the bog would be to get print 10, 20, 50...
but what I actually get is just 10.


Code:
function run()
{
	StartDate=20160104;
	StartDate=20160105;
	int Period;
	int Periods[10] = { 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000 };
		
	while(asset(loop("EUR/USD" )))
  	{
    	Period = Periods[optimize(1,1,10,1)-1];
	printf("Period: %02d, ",Period) ;
	}
}


Re: The Financial Hacker [Re: dr_panther] #462756
10/25/16 16:02
10/25/16 16:02
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
I believe messages are suppressed in training - use print(TO_ANY) for printing in training mode.

Re: The Financial Hacker [Re: jcl] #462765
10/26/16 10:52
10/26/16 10:52
Joined: Aug 2016
Posts: 61
D
dr_panther Offline
Junior Member
dr_panther  Offline
Junior Member
D

Joined: Aug 2016
Posts: 61
Sorry, if my questions about that are ignorant, but after many hours of testing, I still don't understand the output.

My understanding is that the optimize function should generate multiple outputs similar to this code:


Code:
function run()
{
	set(PARAMETERS|LOGFILE);
	StartDate=20160106;
	EndDate=20160107;
	BarPeriod = 1440;
	LookBack =0;
	int Period;
	int Periods[10] = { 10, 20, 50 };
	int i;	
	while(asset(loop("EUR/USD" )))
	for (i=0;i<3;i++)
  	{
    	Period = Periods[i]; //
    	print(TO_ANY,"Period: %d, ",Period) ;
		
	}
}



When I press "Trade", the log file looks like that

Code:
[1: Thu 07.01.16 00:00] (1.07497)Period: 10, Period: 20, Period: 50,



however the following code :
Code:
function run()
{
	set(PARAMETERS|LOGFILE);
	StartDate=20160106;
	EndDate=20160107;
	BarPeriod = 1440;
	LookBack = 0;
 	int Periods[10] = { 10, 20, 50 };
 
	while(asset(loop("EUR/USD" )))
  	{
    	int Period = Periods[optimize(1,1,3,1)-1];  
    	print(TO_ANY,"Period: %d, ",Period) ;
	}
}



generates:

Code:
[1: Thu 07.01.16 00:00] (1.07497)Period: 10,




I wonder how the optimize function can be used to create multiple variations of the trends. Additionally I would like to know if the optimize function is comparable with the for loop.

Thanks for you patients, jcl :))

Page 2 of 2 1 2

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