mbk-dev / okama Goto Github PK
View Code? Open in Web Editor NEWInvestment portfolio and stocks analyzing tools for Python with free historical data
License: MIT License
Investment portfolio and stocks analyzing tools for Python with free historical data
License: MIT License
Right part of the multi-period Efficient frontier now uses a limit defined as:
“The asset with max CAGR lying to the right of the global max CAGR point (risk should be more than self.max_return['Risk']).”
This definition is realized in _max_cagr_asset_right_to_max_cagr()
method.
However, this definition sometimes fails:
Correct algorithm should look for points in the outer space (to the right) of line Global Max CAGR – Max Risk Asset. In this set it should look for an asset with highest CAGR. If there are no assets to right of the line the right part of EF should be skipped.
Now method get_monte_carlo()
returns risk/return DataFrame.
For practice purposes it is important to have weights for every randon portfolio.
I have been thinking that Poetry would be a great way to control dependencies.
As of by writing this Issue, Poetry's version is 1.1.12 and it doesn't allow to have testing dependencies yet, but in version 1.2 they would make it possible. For now, I think it would be best to keep testing dependencies in the development section of poetry.
dividends_annual
property exists in AsssetList. The same should be in Portfolio.
The frame.append method is deprecated and will be removed from pandas in a future version.
sp.index_beta.plot() call terminates with this error:
NameError: name 'std' is not defined
Hello there! There was recently a release from Tinkoff of their first framework to work with time-series prediction called ETNA.
I wonder, would it be suitable to integrate their solution into okama in order to lay next to the Monte-Carlo prediction model?
Link to the framework: https://github.com/tinkoff-ai/etna
Recently I started writing a telegram bot using this library for getting stock data, yesterday it worked just fine but today the data is not updating, what is the cause of this? The data is way past 20 minutes old, I've checked TradingView for the ticker that I use and it seems that the ticker data hasn't updated from yesterday.
(RU) Здравствуйте, недавно я начал писать бота в телеграмм с этой библиотекой, и со вчеращнего вечера я заметил что акции не изменяются, что может быть причиной этого и часто ли так проиходит, а то хотелось бы стабильности в такой хорошей библиотеке как эта.
minimize_risk()
uses “black box” utility function. The slowest part is related with multi-period optimization when the portfolio uses rebalancing strategy.
This algorithm minimizes risk (annualized standard deviation) calculating return time series of the rebaleanced portfolios with Rebalance.return_ts()
method.
Documentation build is failing now.
It looks like sphinx is looking for setup.py:
can't open file '/home/docs/checkouts/readthedocs.org/user_builds/okama/checkouts/latest/setup.py': [Errno 2] No such file or directory
Should we use sphinx as an optional dependency?
https://stackoverflow.com/questions/57988721/poetry-sphinx-cython
Update .travis.yml
to run tests with poetry.
Old .yml uses pip install -r requirements.txt
which is not working now.
So as I saw there is an API from which this beautiful tool gets information. However, I was unable to find any info or source code for the API.
Is it private? Is it going to be open-sourced as well?
If it's private, then is it possible to have swagger documentation of endpoints?
I am asking due to having an idea of making an abstract class for API so that there could be other implementations in the project, apart from this private API!
При вызове AssetList.index_rolling_corr ошибка:
TypeError: check_rolling_window() missing 1 required positional argument: 'ror'
Error while building the docs.
It looks like a known issue with Sphinx:
However pinning to Jinja2<3.1
in /docs/requirements.txt did not fix the issue.
Actual drawdowns
property shows adjusted close drowdowns which may significantly differ in case of high dividends.
New function should calculate mean LTM dividend yield for a certain number of trailing/rolling years.
It can be helpful in Portfolio and AssetList.
When loading certain assets it shows false data.
assets = ok.AssetList(["VTBA.MOEX", "VTBH.MOEX", "SBGB.MOEX"]) assets.wealth_indexes
The result is this:
`
VTBA.MOEX VTBH.MOEX SBGB.MOEX USD.INFL
2021-04 1369.766402 1062.898065 946.963297 1040.959324
2021-05 137.244019 106.279943 966.626194 1049.286999
2021-06 140.203804 107.462560 9.702027 1059.045368
2021-07 143.120043 107.870918 9.866962 1064.128786
2021-08 148.166985 108.334191 9.850195 1066.363456`
Data starting from 2021-06 is junk - those assets did not drop 100 times.
Looks like a bug with formatting/floating point/type conversion.
Actual for classes:
AssetList
Portfolio
dividend_yield_annual
property exists in AsssetList. The same should be in Portfolio.
__init__.py
has imports from namespaces.py
which forces http request to API during import okama
.
Redefine as functions following:
namespaces = get_namespaces()
assets_namespaces = get_assets_namespaces()
macro_namespaces = get_macro_namespaces()\
Rename cagr
argument in plot_transition_map()
with more informative x_axe
.
Default value should be "risk":
x_axe: str = 'risk'
Only two values are allowed: "cagr" and "risk".
Начиная с версии 0.93, импорт библиотеки завершается с ошибкой:
ModuleNotFoundError: No module named 'okama.api'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.