Comments (2)
Really nice catch! You're right about that. Your logic makes sense, and I we can test it with a unit test too:
env.reset()
env.step(np.array([1,0,0,0]))
state, reward, done, info = env.step(np.array([0,1,0,0])
print(info['cost'], env.sim.cost)
# 0.0050, 0.0025
Here I buy 100% cash, then sell 100% cash. For the selling step the cost for that single transaction was twice the transaction cost, so that's double counting.
I'll fix it and add a unit test, thanks again for spotting that.
from rl-portfolio-management.
glad to be helpful
from rl-portfolio-management.
Related Issues (20)
- potential bug in _step HOT 4
- Performance Clarification HOT 1
- Issues running Notebook due to Tensorforce changes HOT 3
- Question about mean market performance HOT 3
- Question - Tensorflow-gpu optional? HOT 22
- Max Draw Down incorrect HOT 1
- Env creating error - 'int' object is not iterable HOT 4
- Gym HOT 5
- Some problem of the torch HOT 3
- GPU usage
- AssertionError: action should be within Box(4,) but is array([ nan, nan, nan, nan]) HOT 1
- Error in importing agents, utils, components HOT 1
- Question about the agent performance
- AttributeError: 'NoneType' object has no attribute 'run' HOT 3
- Question about random_reset in PortfolioEnv HOT 1
- Hello World HOT 2
- 'DataFrame' object has no attribute 'mean_market_returns' HOT 2
- Error running notebook HOT 15
- I'm questioning the paper's validity and/or generalizability HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rl-portfolio-management.