AminHP / gym-anytrading

The most simple, flexible, and comprehensive OpenAI Gym trading environment (Approved by OpenAI Gym)
MIT License
2.13k stars 467 forks source link

How to create environment that uses multiple different episodes with 200 time steps each #81

Closed R470R closed 1 year ago

R470R commented 1 year ago

Hello, I want to make a RL for forex, in wich the environment is feeded with multiple episodes of 200 time steps each.

How can I do it?

kmafutah commented 1 year ago

Ok same symbol or different, if same I fiddled with env_dummy, no fun. But if different symbols am happy with gym-mtsim on rrlib:) Hope that helps.

As for the how, the way that quickly worked for me was . . .

Using gym-anytrading to try a sine wave that looks like your preferred primary symbol. (Some math about Fourier,Bessel and Euler )

Then use lib or ai algorithm you made and RL on that base.

Works well on small time frames, bigger time frames where too bullish and had too many drawdowns (for min lot and min deposit only)

On Thu, 8 Dec 2022 at 20:55, R470|2 @.***> wrote:

Hello, I want to make a RL for forex, in wich the environment is feeded with multiple episodes of 200 time steps each.

How can I do it?

— Reply to this email directly, view it on GitHub https://github.com/AminHP/gym-anytrading/issues/81, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7JXS752PCMHYKPSPTBIPLWMI4JHANCNFSM6AAAAAASYQ5NOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Kudakwashe Mafutah [image: https://]about.me/kmafutah https://about.me/kmafutah?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=edit_panel&utm_content=plaintext

R470R commented 1 year ago

@kmafutah same symbol, is like each episode is 1 signal

kmafutah commented 1 year ago

Ahh gym-anytrading is your favorite puppy. Plus I recall pickling the data( saving train data save as binary made it perform three cents better at session close for eurusd)

Good luck share if you make that dollar extra.

On Thu, 8 Dec 2022 at 22:30, R470|2 @.***> wrote:

@kmafutah https://github.com/kmafutah same symbol, is like each episode is 1 signal

— Reply to this email directly, view it on GitHub https://github.com/AminHP/gym-anytrading/issues/81#issuecomment-1343387835, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7JXS3E55RBUDQ6ZO5ZOULWMJHOPANCNFSM6AAAAAASYQ5NOA . You are receiving this because you were mentioned.Message ID: @.***>

--

Kudakwashe Mafutah [image: https://]about.me/kmafutah https://about.me/kmafutah?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=edit_panel&utm_content=plaintext

R470R commented 1 year ago

What do you mean @kmafutah , feed the environment with binary data?

kmafutah commented 1 year ago

Am saying for me reading binary was faster than reading csv. During retraining and training RL for day trading small time frames.

On Thu, 8 Dec 2022 at 23:07, R470|2 @.***> wrote:

What do you mean @kmafutah https://github.com/kmafutah , feed the environment with binary data?

— Reply to this email directly, view it on GitHub https://github.com/AminHP/gym-anytrading/issues/81#issuecomment-1343437141, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7JXS5C4TMRBQXTIHL7UFLWMJLZTANCNFSM6AAAAAASYQ5NOA . You are receiving this because you were mentioned.Message ID: @.***>

--

Kudakwashe Mafutah [image: https://]about.me/kmafutah https://about.me/kmafutah?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=edit_panel&utm_content=plaintext

R470R commented 1 year ago

Ok @kmafutah , but i don't understand how should I tell the environment that each episode has it's own points and the learning should be transfered (I will use DQN), but I think there's must be a simple solution

R470R commented 1 year ago

You are telling to pickle each episode?

R470R commented 1 year ago

Ok already understood, tomorrow I tell how it had gone

R470R commented 1 year ago

It works well, but I'm going deeper, I will create a custom env myself