Are OptimalF calculated values right with Crypto ?

Posted By: vinsom

Are OptimalF calculated values right with Crypto ? - 04/26/19 11:31

Was just wondering if this is an issue.

Please set the account to BTC.B8 type in accounts.csv

and then train and run the script attached (is using the Z10 asset list), is just a sample taken from the help file.


The training results (attached) is a .fac file where all OptimalF factors are either 0 or .999 for all 12 assets.

Is this normal ?
Thanks

Attached File
ShowFACTOR.c  (70 downloads)
Attached File
ShowFACTOR.fac  (62 downloads)
Posted By: AndrewAMD

Re: Are OptimalF calculated values right with Crypto ? - 04/26/19 12:46

Yes, this is normal. By the way, your Optimal F calculations will not be very good because there are so few trades to analyze per asset/algo combination.
Posted By: vinsom

Re: Are OptimalF calculated values right with Crypto ? - 04/27/19 07:01

Hi Andrew,
THis is just a sample to show the issue. as the result is the same.
Have other Crypto related algos with 20 assets, just don't want to show them to everyone, but receiving the same Factors results.
Either .000 or .999.
Doesn't same normal to me.
With different levels of drawdown per assets, it's very strange to get always .000 or .999.
Posted By: AndrewAMD

Re: Are OptimalF calculated values right with Crypto ? - 04/27/19 16:26

This is worth repeating.

Originally Posted By: AndrewAMD
your Optimal F calculations will not be very good because there are so few trades to analyze per asset/algo combination.

Rewrite your script so that it's making more trades, and then see what that does to your Optimal F calculations.
Posted By: vinsom

Re: Are OptimalF calculated values right with Crypto ? - 04/27/19 20:41

It doesn't matter the script.
I have another script that does 2500 trades with crypto with 20 assets and is the same result
Posted By: vinsom

Re: Are OptimalF calculated values right with Crypto ? - 04/27/19 21:07

Just modified the script to do 12000 trades.
Please see below.
Result is the same
Either .000 or .999 in the .fac file


function run()
{
LookBack = 400;//500;
BarPeriod = 60;
set(LOGFILE);
set(FACTORS);

assetList("History\AssetsZ10.csv");

while(loop(Assets))
{
asset(Loop1);

vars Price = series(price(0));
vars Trend = series(LowPass(Price,500));

Stop = 4*ATR(100);

vars MMI_Raw = series(MMI(Price,300));
vars MMI_Smooth = series(LowPass(MMI_Raw,300));

//if(falling(MMI_Smooth))
{
if(rising(Trend))
enterLong();
else if(falling(Trend))
enterShort();
}

}
}

Assets HistoryAssetsZ10.csv
Read ShowFACTOR.fac
Error 010: Invalid GRS/BTC Stop: 0.0002604 Price: 0.000124200
Loss -2.10843085B MI -1.07107704B DD 2.51155990B Capital 13.50459003B
Trades 12011 Win 29.7% Avg -175.5p Bars 88
ROI -95% PF 0.27 SR -1.36 UI 0% R2 0.83
Posted By: jcl

Re: Are OptimalF calculated values right with Crypto ? - 04/29/19 06:35

AssetsZ10 is not intended for OptimalF calculations.

OptimalF needs not only a high number of trades, but also correct margin cost in the asset list for calculating the investment per trade. If margin cost is missing, it is calculated from the price, but AssetsZ10 does not contain prices either. If you enter them, you'll probably get precise OptimalF factors.
Posted By: vinsom

Re: Are OptimalF calculated values right with Crypto ? - 04/29/19 10:01

Hi Jcl,
why the OptimalF is not using prices from the History in this case ?

Thanks
Vincenzo
Posted By: jcl

Re: Are OptimalF calculated values right with Crypto ? - 04/29/19 10:48

This is a justified question, but I cannot answer it. I only see in the code that it is so, but not why. But I'll inquire.
Posted By: MatPed

Re: Are OptimalF calculated values right with Crypto ? - 04/30/19 11:14

Hi,
incresing the number of trades with oversampling improves (or could be used to) the optimalf calculation?

Thank You
Posted By: jcl

Re: Are OptimalF calculated values right with Crypto ? - 04/30/19 11:16

Yes.
Posted By: AndrewAMD

Re: Are OptimalF calculated values right with Crypto ? - 04/30/19 11:46

Is it better to calculate Optimal F with a fixed Margin size or a fixed Lot size? Or is there an even better method?
Posted By: jcl

Re: Are OptimalF calculated values right with Crypto ? - 04/30/19 12:06

If you do it in the script, use a fixed margin that is the same for all trades of all components.
Posted By: MatPed

Re: Are OptimalF calculated values right with Crypto ? - 05/01/19 23:59

thx
© 2024 lite-C Forums