44 <img src="https://img.shields.io/badge/python-v3-brightgreen.svg"
55 alt="python"></a>
66 <a href="https://pypi.org/project/okama/">
7- <img src="https://img.shields.io/badge/pypi-v0.99 -brightgreen.svg"
7+ <img src="https://img.shields.io/badge/pypi-v1.0.0 -brightgreen.svg"
88 alt="pypi"></a>
99 <a href='https://coveralls.io/github/mbk-dev/okama?branch=master'>
1010 <img src='https://coveralls.io/repos/github/mbk-dev/okama/badge.svg?branch=master'
@@ -87,15 +87,16 @@ The latest development version can be installed directly from GitHub:
8787
8888``` python
8989import okama as ok
90+
9091x = ok.AssetList([' SPY.US' , ' BND.US' , ' DBXD.XETR' ], ccy = ' USD' )
91- print (x)
92+ x # all examples are for Jupyter Notebook/iPython. For raw Python interpreter use ' print(x)' instead.
9293
9394```
9495![ ] ( ../images/images/readmi01.jpg?raw=true )
9596
9697Get the main parameters for the set:
9798``` python
98- x.describe(tickers = False )
99+ x.describe()
99100```
100101![ ] ( ../images/images/readmi02.jpg?raw=true )
101102
@@ -108,37 +109,39 @@ x.wealth_indexes.plot()
108109### 2. Create a dividend stocks portfolio with base currency EUR
109110
110111``` python
111- import okama.portfolio
112-
113112weights = [0.3 , 0.2 , 0.2 , 0.2 , 0.1 ]
114113assets = [' T.US' , ' XOM.US' , ' FRE.XETR' , ' SNW.XETR' , ' LKOH.MOEX' ]
115- pf = okama.portfolio .Portfolio(assets, weights = weights, ccy = ' EUR' )
116- print (pf)
114+ pf = ok .Portfolio(assets, weights = weights, ccy = ' EUR' )
115+ pf.table
117116```
118117![ ] ( ../images/images/readmi04.jpg?raw=true )
119118
120- Plot the dividend yield for each group of assets (based on stock currency).
119+ Plot the dividend yield of the portfolio (adjusted to the base currency).
120+
121121``` python
122122pf.dividend_yield.plot()
123123```
124- ![ ] ( ../images/images/readmi05.jpg ?raw=true )
124+ ![ ] ( ../images/images/readmi05.png ?raw=true )
125125
126- ### 3. Draw an Efficient Frontier for 2 poular ETF: SPY and GLD
126+ ### 3. Draw an Efficient Frontier for 2 popular ETF: SPY and GLD
127127``` python
128128ls = [' SPY.US' , ' GLD.US' ]
129129curr = ' USD'
130- frontier = ok.EfficientFrontierReb(ls, last_date = ' 2020-10' , ccy = curr, reb_period = ' year' ) # Rebalancing periods is one year (dafault value)
130+ last_date= ' 2020-10'
131+ frontier = ok.EfficientFrontierReb(ls, last_date = last_date' , ccy=curr, reb_period=' year' ) # Rebalancing periods is one year (dafault value)
131132frontier.names
132133```
133134
134135
135136Get the Efficient Frontier points for rebalanced portfolios and plot the chart with the assets risk/ CAGR points:
136137```python
138+ import matplotlib.pyplot as plt
139+
137140points = frontier.ef_points
138141
139142fig = plt.figure(figsize = (12 ,6 ))
140143fig.subplots_adjust(bottom = 0.2 , top = 1.5 )
141- ok.Plots(ls, ccy = curr).plot_assets(kind = ' cagr' ) # plots the assets points on the chart
144+ ok.Plots(ls, ccy = curr, last_date = last_date ).plot_assets(kind = ' cagr' ) # plots the assets points on the chart
142145ax = plt.gca()
143146ax.plot(points.Risk, points.CAGR )
144147```
@@ -152,7 +155,7 @@ map = ok.Plots(ls, ccy='USD').plot_transition_map(cagr=False)
152155```
153156
154157
155- More examples are available in [ Jupyter Notebooks] ( https://github.com/mbk-dev/okama/tree/master/notebooks ) .
158+ More examples are available in form of [Jupyter Notebooks](https:// github.com/ mbk- dev/ okama/ tree/ master/ examples ).
156159
157160# # RoadMap
158161
0 commit comments