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 1 of 2 1 2
The Financial Hacker #454438
09/08/15 13:14
09/08/15 13:14
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I've started a new blog on http://www.financial-hacker.com. We're often doing experiments with trade systems for Zorro, and I'm going to publish the results on this blog, as well as some of my other experiences in the realm of algorithmic trading. All code and scripts will be published as well.

Re: The Financial Hacker [Re: jcl] #454442
09/08/15 14:00
09/08/15 14:00
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
I have read the articles. Good Job man!

Re: The Financial Hacker [Re: MatPed] #454444
09/08/15 15:31
09/08/15 15:31
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline
Senior Member
boatman  Offline
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
Fantastic articles jcl. You gave me some more ideas. And its also very helpful to follow your application of the scientific method to trading research. Looking forward to the next article about White's reality check. Thanks for sharing.

Re: The Financial Hacker [Re: boatman] #454449
09/08/15 18:40
09/08/15 18:40
Joined: Feb 2015
Posts: 45
Italy
forexcoder Offline
Newbie
forexcoder  Offline
Newbie

Joined: Feb 2015
Posts: 45
Italy
Jcl thanks very much!!! Great work by a great man!!

Re: The Financial Hacker [Re: forexcoder] #454534
09/09/15 22:02
09/09/15 22:02
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
+1! Thanks for helping us learn more & hopefully faster! laugh

Re: The Financial Hacker [Re: jcl] #454589
09/11/15 02:51
09/11/15 02:51
Joined: Oct 2012
Posts: 16
Western Australia
4xBones Offline
Newbie
4xBones  Offline
Newbie

Joined: Oct 2012
Posts: 16
Western Australia
Thanks jcl, much appreciated. smile

Re: The Financial Hacker [Re: 4xBones] #454611
09/11/15 17:45
09/11/15 17:45
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Code:
int Periods[10] = { 10,20,50,100,200,500,1000,2000,5000,10000 };
int Period = Periods[optimize(1,1,10,1)-1];


Cool example how to optimize a self-made scale, should be added under 'Tips & Tricks'.

Re: The Financial Hacker [Re: Sphin] #454678
09/14/15 14:34
09/14/15 14:34
Joined: Sep 2015
Posts: 8
T
Toronado Offline
Newbie
Toronado  Offline
Newbie
T

Joined: Sep 2015
Posts: 8
Really like the posts on your financial hacker blog so far. Thanks for those laugh

Re: The Financial Hacker [Re: Toronado] #455684
10/27/15 14:27
10/27/15 14:27
Joined: Jul 2013
Posts: 75
R
royal Offline
Junior Member
royal  Offline
Junior Member
R

Joined: Jul 2013
Posts: 75
Hey jcl!
One question concerning the cold blood index. Do you have an example how to create the BalanceDaily.dbl in a strategy script?

Re: The Financial Hacker [Re: royal] #455688
10/27/15 16:11
10/27/15 16:11
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
if(hour(1) > hour(0))
file_append("Log\\BalanceDaily.dbl",&Balance,sizeof(var));

I'm not sure if the release version accepts a size parameter for file_append - maybe you need the beta version.

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,986
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,986
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 1 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