I want to use Volume column alone as the my observation state. This is the whole code
import random
import numpy as np
import pandas as pd
import trading_env
df = pd.read_csv('./dataset/AAPL.csv')
df.rename(columns={'Unnamed: 0':'serial_number'},inplace=True)
env = trading_env.make(env_id='training_v1', obs_data_len=50, step_len=14,
df=df, fee=0.1, max_position=5, deal_col_name='Close',
feature_names=['Volume'])
env.reset()
env.render()
state, reward, done, info = env.step(random.randrange(3))
### randow choice action and show the transaction detail
for i in range(500):
print(i)
state, reward, done, info = env.step(random.randrange(3))
print(state, reward)
env.render()
if done:
break
env.transaction_details
IMPORTANT: Can you please tell me what is the action space index for buy, sell and hold. I can see action space consists of three integers but can't find where its mapped to.
Thank you for this I was looking for something like this. when I am trying out this I am getting a assertion error like this
data frame sample
I want to use Volume column alone as the my observation state. This is the whole code
IMPORTANT: Can you please tell me what is the action space index for buy, sell and hold. I can see action space consists of three integers but can't find where its mapped to.