Code Monkey home page Code Monkey logo

Comments (2)

zcy-4747 avatar zcy-4747 commented on May 19, 2024

I tried to use this model with other stock data, but failed

from finrl-trading.

emjay032 avatar emjay032 commented on May 19, 2024

maybe a little late, but 181 is the dimension of the state space:

balance + num_stocks+holdings +technichal indiactors
1+30+30+4*30 (4 technical indicators for each 30 stocks) = 181
balance = [balance]
num_stcosk = [stock_1,stock_2+...+stock_30]
technicahl indicators = [TI_1,stock_1,TI_2,stock_1,TI_3,stock_1,TI_4_stock_1,+...+TI_1,stock_30,TI_2,stock_30,TI_3,stock_30,TI_4_stock_30]
if you have a state space of dimension 176 change self.observation_space = spaces.Box(low=0, high=np.inf, shape = (181,)) to self.observation_space = spaces.Box(low=0, high=np.inf, shape = (176,))

low depends on the input of your data if you have negartive values i would recomend low = -np.inf

additionally when training and testing you should normalize the input to[-1,1] for your neural net by VecNormalize follwoing the Stable Basleine Documentation (training also the reward)
https://stable-baselines.readthedocs.io/en/master/guide/vec_envs.html

from finrl-trading.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.