Skip to content

Multivariate Adaptive Regression Splines for Time Series Prediction

License

Notifications You must be signed in to change notification settings

0zean/MARS-Time-Series

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MARS-Time-Series

Multivariate Adaptive Regression Splines for Time Series Prediction

Python Script to fit a MARS model to 5-minute Apple stock data to predict the high at a given interval

Requirments

The general premise of this model is to use the Open price and a select few technical indicators, namely a 7-period Standard deviation and Hilbert Transform Dominant cycle period both calculated with the Open price. the Close, High, Low, and Volume were removed from the training set since these values are definitively formed only posteriorly, thus the Open price and its transformations were used.

Predicting the Close price proved to be unavailing in testing so prediction of the High price for a given 5-minute interval was chosen instead.

Each feature was normalized with a log(feature + 1) transformation and then fit to the default MARS model from py-earth

In Sample Results (Zoomed in):

alt text

Out Sample Results (Zoomed in):

alt text

The model was then passed through the AdaBoostRegressor boosting method

In Sample Adaboost Results (Zoomed in):

alt text

Out Sample Adaboost Results (Zoomed in):

alt text

the results were then measued with mean squared error, R-squared, and Standard Error of the Estimate:

alt text

The average estimate error for the boosted model turns out to be ~ $0.28 out of sample

About

Multivariate Adaptive Regression Splines for Time Series Prediction

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages