vicmacbec / algoTrading

Trading algorithms tests.
MIT License
0 stars 0 forks source link

ML with rule techniques #9

Open vicmacbec opened 1 year ago

vicmacbec commented 1 year ago

Test a machine learning algorithm using trading rules as features.

vicmacbec commented 1 year ago

First feature importance.

1featureImportance

Best half most importance pairs halfMostImportanceFeatures

vicmacbec commented 1 year ago

Looking the bias vs variance curves, we can see that there is overfitting since the test curve never down. biasVarianceAll To reduce the overfitting, we proceed to reduce the features using the most important half of features. biasVarianceImportants We can observe that the the test curve does not down, so know we are going to proceed to use regularization.

vicmacbec commented 1 year ago

Changing the target of the increase of the 5 % of the price in the next week, the bias variance plot gives better solutions. The overfitting still remain but is more acceptable. biasVarianceImportanceNewTarget cmNewTarget

A view of a sample of the test orders is: sampleTestOrdersNewTarget where the red diamonds are false positive orders (maximice specificity), the black squares are false negative orders and the black squares with red diamonds are the true positive orders (maximice them)

Notes

vicmacbec commented 1 year ago

To do:

vicmacbec commented 1 year ago

Bias Variance plot using cross validation with 5 folds and parameters:

vicmacbec commented 1 year ago