Comments (8)
The relevant inputs we currently need are:
- daily returns
- positions
- transactions
get_backtest()
returns an object that is a simple collection of DataFrame
s that contain the relevant information. Returns are very easy to get and have the same format we require.
There is one major difference between the formats used for positions and transactions. While we have one index dt per day for positions and then store the positions as a dict, this uses duplicated daily dts as an index, one for each position. The format in QRP is probably better to work with in the long term so I propose we switch internally to use the prior format established by @ssanderson.
from pyfolio.
@ssanderson Can you point me to the code where you are building up these data structures? Do you think it's a good idea to borrow that same code here?
from pyfolio.
From @ssanderson: "qexec/research/backtest.py, in the constructor of the BacktestResult class" https://github.com/quantopian/qexec/blob/master/qexec/research/backtest.py#L424
from pyfolio.
@ssanderson @twiecki do either of you know whether the result from get_backtest() contains an attribute that might contain the date which the algo started live zipline papertrading (if it has)? This could easily allow us to compute both in-sample and out-of-sample stats for algos that both have a backtest+papertrading
from pyfolio.
Good point, we'd definitely need that, I don't know the answer though. Maybe a backtest and live algo are different entities for research? So we'd have to stitch them together manually.
from pyfolio.
@justinlent @twiecki the BacktestResult
object has start_date
and end_date
attributes, which should have the correct values for both backtesting and live results.
Note that Q research doesn't currently support accessing live algo results at all. There's a PR from @seongsean that implemented the functionality here: https://github.com/quantopian/qexec/pull/5252. At the time, it was sidelined due to security concerns because we didn't have user_id validation.
from pyfolio.
I believe this does not fully support minute backtest results.
from pyfolio.
I checked and I think it should. The positions are daily to begin with and the transaction code also aggregates over full days.
from pyfolio.
Related Issues (20)
- AttributeError: module 'pandas_datareader.data' has no attribute 'get_data_google' HOT 1
- Quantopian/pyfolio is NO LONGER MAINTAINED - See other forks
- Pyfolio
- Export output
- TypeError: an integer is required (got type bytes) HOT 1
- backtrader HOT 1
- Performance attribution
- 'NaTType' object has no attribute 'ordinal'
- Cant save figures to files
- Optimizable using market sentiments
- 'Series' object has no attribute 'iteritems' HOT 3
- 'Series' object has no attribute 'iteritems' - iteritems seems to have been deprecated HOT 4
- Inclusion of Google colab codes in the notebook section
- AttributeError: module 'pandas' has no attribute 'Float64Index'
- Inaccurate Returns? HOT 1
- Build problem
- AttributeError: 'numpy.int64' object has no attribute 'to_pydatetime' HOT 1
- code fix : estimate_intraday 'date' is both an index level and a column label, which is ambiguous.
- Incorrect no of months
- 'Series' object has no attribute 'iteritems'
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 pyfolio.