Comments (1)
The below is probably a different issues if your values are totally different, but here goes...
I have been finding that the call to:
metrics = qs.reports.metrics(returns, display=False, sep=False, mode="full")
Gives you values that are rounded. Max Drawdown for example comes back as -0.08 if the drawdown was -8.38% for example. I have been unable to find any option that would change the output values so they are not rounded. What you can do is can pass internal=True like:
metrics = qs.reports.metrics(returns, display=False, sep=False, mode="full", internal=True)
But, this will return strings of numbers used in the HTML report. So, for Max Drawdown for example you would get back "-8.3%", which is better than -0.08. But since this is a string, also not exactly what you want.
You could use the qs.stats method to return un-rounded values, but that is less elegant as you need to know all the key names for each stat. For instance, you could call:
mdd = qs.stats.max_drawdown()
This will get you the full value, which you can then round / multiply how you want. I was hoping I could get the the qs.metrics method to return all the un-rounded values.
from quantstats.
Related Issues (20)
- Plots don't display when using matplotlib backend qt HOT 1
- Is this project **ABANDONED** ? HOT 1
- Asset Wise Transaction List - Profit Loss Account
- Incompatibility with AWS Lambda
- TypeError: unsupported operand type(s) for +: 'float' and 'str' HOT 3
- Warings about pd.to_timedelta
- 'TypeError: super(type, obj): obj must be an instance or subtype of type' in the super() function of reports.html HOT 1
- stats.py: res = abs(total + 1.0) ** (1.0 / years) - 1 <-- ZeroDivisionErrorZeroDivisionError HOT 1
- Deprecated code in stats.py expected_return()
- Calculation of 3Y and 5Y annualized return date lag
- report.py's cagr function doesn't include the days per year options HOT 1
- Fix kelly_criterion formula for investment scenario
- draw visuals in plotly
- Jupyter import issue: `magic(...)` is deprecated
- Cumulative Performance in reports.html does not calculate correctly HOT 4
- Generate full html_report but save as image
- Datetime issue
- "Strategy" HOT 1
- is _qtd bug ?
- utils.make_index : TypeError: unsupported operand type(s) for +: 'float' and 'str' HOT 6
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 quantstats.