Machine learning in trading: theory, models, practice and algo-trading - page 2833

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I don't know much about either python or catbusta, but I'll ask stupid questions)
1) What is data, why is the average not from preds?
2) It seems that for gradient bousting you need to specify formulas for gradient and hessian?
Apparently yes, I missed something. I used the template from the official site https://catboost.ai/en/docs/concepts/python-usages-examples.
data - generated list of model predictions, I converted negative values into positive ones to calculate their arithmetic mean for Sharpe's average
data - generated list of model predictions, negative values were converted to positive values to calculate their arithmetic mean for Sharpe's average
Why? For Sharpe, the average with the original signs is calculated.
Why? For Sharpe, the average with the original signs is considered.
To take into account also sell orders, let's say there are 2 accurate forecasts -0.002 (20 pips) and +0.003 (minus - short, plus - long).
Profit is +0.005, average is 0.0025, and without changing the sign it will be 0.0005.
Apparently yes, missed something. I used the template from the official site https://catboost.ai/en/docs/concepts/python-usages-examples.
There are two types of metrics loss_function and eval_metric. You probably need the first one, look here https://catboost.ai/en/docs/concepts/python-usages-examples#user-defined-loss-function
But I may be wrong. There are better python experts and python praisers here than me) Maybe they will help you more.
To take into account also sell orders, let's say there are 2 accurate forecasts -0.002 (20 pips) and +0.003 (minus - short, plus - long).
Profit +0.005, the average is 0.0025, and without changing the sign it will be 0.0005.
Well, that wouldn't be a Sharpe. Also, perhaps, it is necessary not just to take the module, but to multiply it by the sign of the forecast (by minus one if selling and by one if buying).
The result of training a model with my version is almost the same as with RMSE, so there is an error somewhere in the code.
preds and target are return (a[i]-a[i+1])
Print the values you get and compare them with the other metric. Print both at once, for each iteration. In catbusta early stop don't forget to enable max user criteria and "use best model=True" You can just enable Verbose, it will print metric values at each iteration.
It would be interesting for research purposes (even though it is quite complicated) to do via a custom loss function. There is a possibility for this (if you are thrown to the beginning of the page, you need to find the User-defined loss function section at the very bottom).
It would be interesting for research purposes (although it is quite complicated) to make a custom loss function. There is a possibility for this (if you are thrown to the beginning of the page, you should find the User-defined loss function section at the very bottom).
It would be interesting for research purposes (although it is quite complicated) to make a custom loss function. There is a possibility for this (if you are thrown to the beginning of the page, you need to find the User-defined loss function section at the very bottom).
I didn't succeed with xgboost...
Yeah, that's the tricky part. You have to calculate the gradient and the matrix of second derivatives, the Hessian. The Hessian must also be positively definite.
For profit, for example, the Hessian is degenerate like (equal to zero). It is necessary to somehow finesse the loss function to a reasonable compromise between need and necessity.