Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Key contributors include:

- [**Hongyang (Bruce) Yang**](https://www.linkedin.com/in/brucehy/) – research and development on financial reinforcement learning frameworks, market environments, and quantitative trading applications
- [other contributors…]

## Overview

FinRL has three layers: market environments, agents, and applications. For a trading task (on the top), an agent (in the middle) interacts with a market environment (at the bottom), making sequential decisions.
Expand Down
2 changes: 1 addition & 1 deletion finrl/meta/env_cryptocurrency_trading/env_btc_ccxt.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def reset(
self.stocks * 2**-4,
)
).astype(np.float32)
return state
return state, {}

def step(self, action) -> (np.ndarray, float, bool, None):
stock_action = action[0]
Expand Down
4 changes: 2 additions & 2 deletions finrl/meta/env_cryptocurrency_trading/env_multiple_crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def reset(
self.total_asset = self.cash + (self.stocks * self.price_array[self.time]).sum()

state = self.get_state()
return state
return state, {}

def step(self, actions) -> (np.ndarray, float, bool, None):
self.time += 1
Expand Down Expand Up @@ -106,7 +106,7 @@ def get_state(self):
tech_i = self.tech_array[self.time - i]
normalized_tech_i = tech_i * 2**-15
state = np.hstack((state, normalized_tech_i)).astype(np.float32)
return state
return state, {}

def close(self):
pass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def reset(
+ self.get_date_vector(self.date_index)
)
self.state_memory.append(init_state)
return init_state
return init_state, {}

def get_date_vector(self, date, cols=None):
if (cols is None) and (self.cached_data is not None):
Expand Down
2 changes: 1 addition & 1 deletion finrl/meta/env_stock_trading/env_stocktrading_stoploss.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def reset(
+ self.get_date_vector(self.date_index)
)
self.state_memory.append(init_state)
return init_state
return init_state, {}

def get_date_vector(self, date, cols=None):
if (cols is None) and (self.cached_data is not None):
Expand Down