Comments (5)
Hi,
I believe this might be due to the fact that .dropna() is not being done on monthly resampled data. @JordanPlatts what are your thoughts on that?
from ffn.
Thanks for your time in looking into this, and apologies for the late reply.
I guess it all come down to this question, as you put it:
"The question is do you think the price in the beginning of May was 118 and should the ffn library assume that."
I use this package almost exclusively to analyse results of systematic trading strategies, and missing data for a month implies nothing more than the fact that there were just no trades that month, and hence the "price" of my series didn't change (as it is just the index of performance), therefore the ending "price" of the last month with a non zero return can indeed be seen as the starting "price" for the next month with a non zero return.
Whether "missing data" should be treated as truly "missing" rather than just "non existent" is a subjective call I guess - partly depends on what you are actually analysing.
I would have thought (perhaps naively) that a decent proportion of users would be using the ffn package to analyse "user created" price series such as results of trading strategies/portfolios, along with those who use it to analyse pure stock exchange price data.
Once again, I do appreciate you taking the time to look into my request - much appreciated!
from ffn.
Bug 1
The .pct_change() method uses fill forward to replace missing prices where ffn currently uses shift as you can see below.
This is apparent when you run .pct_change() on monthly_prices.
I don't view this as a bug because I don't like the library making the assumption that prices should filled forward. With that said, if everyone feels different I can change it.
The question is do you think the price in the beginning of May was 118 and should the ffn library assume that.
Onto bug 2
from ffn.
It was the same issue for bug 2.
The price 4416.56 was used as the beginning of September.
from ffn.
I'm having the same issue. Is there a suggestion for dealing with series of returns which contain 0s or missing values, due to the fact that the trading algo was "out of the market" for that period (position size was 0)?
from ffn.
Related Issues (20)
- ffn plot on pycharm HOT 1
- TypeError: string indices must be integers HOT 4
- TypeError: string indices must be integers HOT 1
- divide by zero encountered in true_divide
- Cannot fetch data
- Is ffn still working?
- Basic example on fetching data fails with TypeError (Python 3.11 and 3.11.2) both on Macos and Linux Ubuntu 22.04 HOT 1
- How can I correct this error? HOT 2
- Ulcer Index not according to definiton (miscalculation)
- ImportError: cannot import name 'Panel' from 'pandas'
- Add yfinance.pdr_override() to readme example
- yfinance dependency triggers import fail in downstream project
- Code improvement _erc_weights_slsqp > fitness function
- TypeError from ufunc `isinf` in `calc_inv_vol_weights`
- importing ffn is changing matplotlib settings
- in python 11,there are some warnings about ffn HOT 1
- Please give a way to define a custom data source
- Shorts?
- Storing Statistics into Excel HOT 1
- Does the library support dividends? HOT 1
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 ffn.