Skip to content

snoop2head/elastic-stock-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock Price Prediction Competition @DACON

Open In Colab

🔗 Refer to blog post for more experimentation notes

Goal

  • Predicting the Closing price of 376 Korean public companies
  • Public Leaderboard was based on the Closing price of 2021-09-01 ~ 2021-09-06
  • Private Leaderboard was based on the Closing price of 2021-09-27 ~ 2021-10-01.
  • No limitations for the data source, but there were limitations for submissions per day.

Result

🥈 NMAE score of 4.44 ranked the 2nd place / 29 teams

output

Models' Performance

ElasticNetCV model’s NMAE score outperformed Baseline’s score by 30%. Competition's criterion is based on NMAE. Criterion function was constructed as following:

def NMAE(true_df, pred_df_input):
    """ grading criterion for public leader board """
    return (abs(true_df_copy - pred_df_input) / true_df_copy * 100).iloc[:5].values.mean()
Model NMAE (09-06 ~ 09-10) NMAE (09-15 ~ 09-24) NMAE (09-27 ~ 10-01)
ElasticNetCV 3.02 2.93 4.31
ARIMA(0,1,1) 3.03 - -
ElasticNet 3.12 - -
XGBoost 3.87 4.22 -
Linear Regression
(Baseline Code)
4.03 - 6.42
RFRegressor 4.11 - -
pmdARIMA 8.81 - -

Model was further evaluated on November which marked similar performance as it was in September.

img

Installation

TA-Lib

Other Dependencies

pip3 install -r requirements.txt

How to run

python main.py

Authorship

  • @sanghoeKim
    • Created the dataset, chose and added derivative data.
    • Constructed training process for the ElasticNet model.
    • Set the loss function for the evaluation.
    • Tested XGBRegressor, DNN and ElasticNet.
  • @snoop2head ✋
    • Applied cross validation by using ElasticNetCV model.
    • Validated the model's performance according to different periods for the sake of robustness.
    • Completed the model's inference for the evaluation period.
    • Tested ARIMA, RandomforestRegressor and ElasticNetCV.
  • @tjy3090
    • Provided knowledge for stock market behavior.
    • Tested ARIMA.

Releases

No releases published

Packages

No packages published

Languages