Comments (5)
Could you please elaborate a little bit please on this issue?
As I have taken a look INR-USD data is limited by 18 years by the API of Okama. However, I even struggled to find data for INR-USD on the internet!
Was able to find only this one https://fred.stlouisfed.org/series/DEXINUS
from okama.
In the example above first_date
of AssetList is not correct. It can't be 1990 when period_length
is 15 years.
Here the problem is more general and not depending on INRUSD only. There are rare situations when the period_length
of AssetList or Portfolio is limited by one of the currencies. Usually assets limit it.
ListMaker._make_list should check FX first_date also when adjusting to the base currency.
from okama.
In the example above
first_date
of AssetList is not correct. It can't be 1990 whenperiod_length
is 15 years. Here the problem is more general and not depending on INRUSD only. There are rare situations when theperiod_length
of AssetList or Portfolio is limited by one of the currencies. Usually assets limit it. ListMaker._make_list should check FX first_date also when adjusting to the base currency.
I still do not understand fully the idea behind this. What's the expected behavior?
from okama.
period_length
is the difference between the first_date
and last_date
. If you check the example above period_length
is 15 years and 11 months. However, the first_date
is 1990-08 and the last_date
is 2021-11. The parameter first_date
is not correct here.
What is happening...
When Portfolio or AssetList is initiated, we download several historical data series:
- assets
- inflation
- base currency
- FX currency pairs to adjust the rate of return to the base currency
first_date
of the AssetList is the latest first_date of the mentioned time series. last_date
is the newest last_date
. It should work this way, but for some reason I forgot to include FX currency rates used in _adjust_ror_to_currency in this comparison:
first_dates_sorted: list = sorted(first_dates.items(), key=lambda y: y[1])
last_dates_sorted: list = sorted(last_dates.items(), key=lambda y: y[1])
In the example above the first_date should consider the INRUSD.FX historical data depth.
from okama.
Resolved by d3c0174
from okama.
Related Issues (20)
- Test okama wiht Python 3.10 HOT 1
- ImportError: cannot import name 'environmentfilter' from 'jinja2' HOT 1
- `.assests_first_dates` values are reseted in AssetList initiation
- Add assets weights to get_monte_carlo() output HOT 1
- Create `price_drawdowns` method for Portfolio & AssetList
- Look for a correct low limit of the multi-period EF (right part)
- Make faster multi-period minimize_risk() algorithm
- AssetList.describe() does not show CAGR values for perods within .period_length HOT 1
- Tickers with dot "." HOT 6
- Calculate real drawdowns
- avoid running the module namespaces.py when importing okama HOT 7
- Include ListMaker methods in the documentation
- Rename cagr argument in plot_transition_map() with x_axe HOT 7
- Make .describe() method show information for CAGR if the history period is below 1 year
- Add `get_mean_dividend_yield()' function to AssetList and Portfolio
- Add ex-post Tracking Error method to Portfolio
- plot_cml is taking wrong Maximum Sharpe Ratio (MSR) point HOT 1
- Library not fetching new data HOT 5
- Add `dividend_yield_annual` property for Portfolio
- Add `dividends_annual` property for Portfolio HOT 2
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 okama.