Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 31, 2023
1 parent 14c1031 commit 9b2cf8a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
28 changes: 13 additions & 15 deletions finrl/applications/stock_trading/stock_trading.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

import pandas as pd
from stable_baselines3.common.logger import configure

from finrl.agents.stablebaselines3.models import DRLAgent
from finrl.config import DATA_SAVE_DIR
from finrl.config import INDICATORS
from finrl.config import RESULTS_DIR
from finrl.config import TENSORBOARD_LOG_DIR

from finrl.config import TRAINED_MODEL_DIR
from finrl.config_tickers import DOW_30_TICKER
from finrl.main import check_and_make_directories
Expand All @@ -26,20 +26,18 @@


def stock_trading(
train_start_date: str,
train_end_date: str,
trade_start_date: str,
trade_end_date: str,
if_store_actions: bool = True,
if_store_result: bool = True,
if_using_a2c: bool = True,
if_using_ddpg: bool = True,
if_using_ppo: bool = True,
if_using_sac: bool = True,
if_using_td3: bool = True,
train_start_date: str,
train_end_date: str,
trade_start_date: str,
trade_end_date: str,
if_store_actions: bool = True,
if_store_result: bool = True,
if_using_a2c: bool = True,
if_using_ddpg: bool = True,
if_using_ppo: bool = True,
if_using_sac: bool = True,
if_using_td3: bool = True,
):


sys.path.append("../FinRL")
check_and_make_directories(
[DATA_SAVE_DIR, TRAINED_MODEL_DIR, TENSORBOARD_LOG_DIR, RESULTS_DIR]
Expand Down Expand Up @@ -247,7 +245,7 @@ def stock_trading(
# select the rows between trade_start and trade_end (not included), since some values may not in this region
dji = dji.loc[
(dji[date_col] >= trade_start_date) & (dji[date_col] < trade_end_date)
]
]

result = dji

Expand Down
14 changes: 7 additions & 7 deletions finrl/applications/stock_trading/stock_trading_rolling_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ def stock_trading_rolling_window(
trade_start_date: str,
trade_end_date: str,
rolling_window_length: int,
if_store_actions: bool=True,
if_store_result: bool=True,
if_using_a2c: bool=True,
if_using_ddpg: bool=True,
if_using_ppo: bool=True,
if_using_sac: bool=True,
if_using_td3: bool=True,
if_store_actions: bool = True,
if_store_result: bool = True,
if_using_a2c: bool = True,
if_using_ddpg: bool = True,
if_using_ppo: bool = True,
if_using_sac: bool = True,
if_using_td3: bool = True,
):
# sys.path.append("../FinRL")
check_and_make_directories(
Expand Down

0 comments on commit 9b2cf8a

Please sign in to comment.