Giter Club home page Giter Club logo

gym_trading's People

Contributors

adrianp- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gym_trading's Issues

Possible to implement env.render()?

I have been playing around with implementing an updating chart with the gym.envs.classic_control.rendering object, as seen in https://github.com/openai/gym/blob/master/gym/envs/classic_control/pendulum.py

I added a variable 'self.data' to save the data, and

   def render(self, mode='human'):
        if self.viewer is None:
            print("Creating the rendering view:")
            self.viewer = rendering.Viewer(640, 480)
        fig = self.data.plot().get_figure()
        filename = './plot.png'
        fig.savefig(filename)
        plt.close('all')
        self.img = rendering.Image(filename, 640., 480.)
        self.imgtrans = rendering.Transform()
        self.img.add_attr(self.imgtrans)
        self.viewer.add_onetime(self.img)
        return self.viewer.render(return_rgb_array = mode =='rgb_array')

However only a white image window appears. The png file is fine, but it doesn't show in self.viewer. I've not been able to find much information on this. Any thoughts?

empty portfolio

There is a case when Baseline DQN Gym_Trading Tutorial.ipynb fails with KeyError Profit. It happens when agent the whole episode choose only 0 and 3 actions. This results in that neither this line

self.journal.append(self.curr_trade)

nor this one
self.journal.append(self.curr_trade)

is never executed and portfolio.journal remains empty. Consequently, line

profit = journal["Profit"].sum()

in Jupyter notebook crashes.

Question about low GPU utilisation

Hi,
I'm using gym_trading to learn about RL for algotrading.

Compared to some simple models I did with RNNs I noticed the learning takes significantly longer.
So I switched to running it on my 2080 ti. Runs a bit faster than on CPU.
But then I notice the total GPU utilization is only about 7-10% and that's on a desktop machine.

Is there a way I can speed up the learning and use more GPU power?

difference between reward and profit

Hi @AdrianP- !

First of all, many thanks for this repo! For me, it's the clearest and features-rich at the same time among many other trading gyms.

Sorry for using issues for asking the questing, but I haven't found any contacts on your GitHub page.

Can you please clarify the difference between reward and Profit?

Issue to start a new environnment

I try to create a new environnment but I have a problem :

Traceback (most recent call last):
File "test.py", line 16, in
env = gym.make('trading-v0')
File "/home/nicolas/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 163, in make
return registry.make(id)
File "/home/nicolas/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 121, in make
patch_deprecated_methods(env)
File "/home/nicolas/.local/lib/python3.5/site-packages/gym/envs/registration.py", line 181, in patch_deprecated_methods
env.seed = env._seed
AttributeError: 'TradingEnv' object has no attribute '_seed'

Versions :
gym (0.9.6)

Does it requires an older version of gym ?

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.