Skip to content

freddy645645/NYCU_2024_AI_Final

Repository files navigation

NYCU_2024_AI_Final

Python NumPy Pandas Matplotlib FinRL yfinance PPO KAN

Our topic is utilizing Kolmogorov-Arnold Networks (KAN) and feature engineering to enhance the performance of reinforcement learning (RL) in the FinRL environment. FinRL is an RL environment from NIPS Datasets and Benchmarks 2022, providing benchmarks for researching RL algorithms in financial markets.

Getting Started

Setup Environment

git clone https://github.com/freddy645645/NYCU_2024_AI_Final.git
cd NYCU_2024_AI_Final
pip install -r requirements.txt

Fetch Data

Use the following command to fetch data from Yahoo Finance.

You can use --help to see the help message of the script.

python get_data.py --train -s 2024-01-01 -e 2024-04-30
python get_data.py -s 2024-05-01 -e 2024-05-15

Train the model

We have provided a trained model in the trained_models folder. If you want to train the model with your data, you can modify the constants in the train.py file. Then you can train the model by running the following command.

python train.py

Visualize the trained model

You can visualize the trained model by running the following command. The output will be saved in the results/pic folder. You can use --help to see the help message of the script.

python interpretable.py

Backtest the model

You can backtest the model of your testing data by running the following command. The output will be saved in the results folder. You can use --help to see the help message of the script.

python test.py

Comparison to baseline

We use the original model of FinRL as the baseline

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages