question-mark

Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regarding Reward and Profit

See original GitHub issue

Issue Description

Hi,

I recently used anytrading with a custom environment and stable baseline’s PPO2 algo.

After running the evaluation part 10 times my output was something like

info {'total_reward': 24392200.00000009, 'total_profit': 0.9844407417070604, 'position': 0}
info {'total_reward': 48881799.99999967, 'total_profit': 1.011612620710015, 'position': 0}
info {'total_reward': 51085300.00000165, 'total_profit': 1.013074701451891, 'position': 1}
info {'total_reward': 14793399.999999177, 'total_profit': 0.9767670021357563, 'position': 0}
info {'total_reward': 17957400.000001136, 'total_profit': 0.9815584135159401, 'position': 0}
info {'total_reward': -2354400.0000011073, 'total_profit': 0.9607471236716814, 'position': 1}
info {'total_reward': 20103799.9999998, 'total_profit': 0.9839828662099608, 'position': 0}
info {'total_reward': 19209400.000002127, 'total_profit': 0.9826626717429163, 'position': 1}
info {'total_reward': 14625800.00000124, 'total_profit': 0.9773373249065562, 'position': 1}
info {'total_reward': 53867999.99999998, 'total_profit': 1.0180095847348958, 'position': 1} 

As far as i understand profit, if profit is >1 it is profit otherwise <1 is loss. My question is why is the total_reward positive in cases where the total_profit is actually <1 (loss).

Also it seems like it trades too frequently even when it shouldn’t, Can we add one such action like wait to see a bigger price difference or trend. (Sorry if there’s a proper term for it, I am new to trading stuff)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
kmafutahcommented, May 3, 2021

I found this to work shame it’s on baseline and not keras and plaidml

https://stackoverflow.com/questions/64687298/stable-baselines-dqn-not-performing-properly

… the solution for your last question is in the question in the stack overflow.

Hope it helps. 😃

If I may ask my good people has anyone come across a gym-anytrading environment with Buy, Sell,Hold,Exit actions ? Or it’s there and I don’t see it?

Rgds KM

On Sun, 2 May 2021 at 22:31, AlphaNumeric99 @.***> wrote:

I don’t understand how to implement sine wave?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/AminHP/gym-anytrading/issues/35#issuecomment-830867374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7JXS7Q6GS2VGQLMGMN5LTTLWZCLANCNFSM43ZPUWSA .

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

0reactions
AlphaNumeric99commented, May 17, 2021
  1. Understood. Hopefully you update here if you find an even better reward strategy.
  2. Thank you
Read more comments on GitHub >

github_iconTop Results From Across the Web

Profits are a Reward, Not a Purpose - The Clemmer Group
Many studies of the role and impact of values or ethics on corporate performance have proven that profits follow from worthy and useful...
Read more >
Profit vs Reward - What's the difference? | WikiDiff
As nouns the difference between profit and reward. is that profit is profit while reward is something of value given in return for...
Read more >
The Role of Profit As an Incentive - Small Business - Chron.com
Company owners often share profits as an employee incentive to improve the quality of work within a business and to motivate employees to...
Read more >
Risk/Reward Ratio: What It Is, How Stock Investors Use It
The risk/reward ratio measures the difference between a trade entry point to a stop-loss and a sell or take-profit order.
Read more >
Profit = reward for risk - PhilYale.com
Business owners are reminded daily there are no guarantees, and that every transaction, customer, employee, supplier, relationship, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found