-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: redefine dividend_yield for Portfolio
Portfolio dividend yield calculated as a weighted sum of the assets dividend yields (adjusted to the portfolio base currency).
- Loading branch information
1 parent
1df9d2e
commit 245e3c7
Showing
4 changed files
with
42 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import okama as ok | ||
x = ok.Portfolio(['SBERP.MOEX'], ccy='RUB', inflation=True) | ||
print(x.assets_dividend_yield) | ||
y = ok.AssetList(['T.US', 'CLDN.LSE'], ccy='GBP') | ||
print(y.assets_ror) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters