Comments (6)
hi buddy. i hope you're doing great. I want to give this issue a try if you let me.
from okama.
Hey chilango, from what I've found the issue is not with the ticker having a dot but that specific suffix isn't actually correct for this asset. The ok.asset() works for SPY.US and in this case i'm assuming by BRK.A you mean the Berkshire Hathaway Inc Class A. Which for this asset the ticker is BRK-A.US and this does indeed work with the ok.asset() function. Seeing as a lot of assets are spelled differently online it could be helpful to return a check on the database to see what the user meant by his input as some assets will have dots where dashes should be and vice versa.
from okama.
Hey chilango, from what I've found the issue is not with the ticker having a dot but that specific suffix isn't actually correct for this asset. The ok.asset() works for SPY.US and in this case i'm assuming by BRK.A you mean the Berkshire Hathaway Inc Class A. Which for this asset the ticker is BRK-A.US and this does indeed work with the ok.asset() function. Seeing as a lot of assets are spelled differently online it could be helpful to return a check on the database to see what the user meant by his input as some assets will have dots where dashes should be and vice versa.
Actually my example was not correct. One should request BRK.A.US
:
But the bug still remains.
from okama.
hi buddy. i hope you're doing great. I want to give this issue a try if you let me.
Sure. It should not be defficult. The problem is how namespace
defined:
Line 52 in 2c8d577
from okama.
@chilango74 bro, I'm not quite sure about what you want. do you want this "BRK.A" to be acceptable? in another word when we enter " BRK.A " this must be "BRK.A" not anything else. it's right?
from okama.
@chilango74 bro, I'm not quite sure about what you want. do you want this "BRK.A" to be acceptable? in another word when we enter " BRK.A " this must be "BRK.A" not anything else. it's right?
Our database uses namespaces to identify stock markets. To get the information about US ticker BRK.A one must use it with US namespace. The complete symbol is BRK.A.US
(BRK.A is a ticker, US - namespace). Now the package does not correctly identify the namespace if the symbol has more than one dot in request.
The correct definition of Namespace - the combination of symbols after the LAST dot.
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
- 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.