Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with build_portfolio #136

Open
val-pan opened this issue Sep 21, 2024 · 0 comments
Open

Issue with build_portfolio #136

val-pan opened this issue Sep 21, 2024 · 0 comments

Comments

@val-pan
Copy link

val-pan commented Sep 21, 2024

Running basic example:

from finquant.portfolio import build_portfolio
names = ['GOOG', 'AMZN', 'MCD', 'DIS']
pf = build_portfolio(names=names, data_api="yfinance")
pf.properties()

Produces NaNs for all stocks except for the first in the list:

Stocks: AMZN, DIS, GOOG, MCD
Time window/frequency: 252
Risk free rate: 0.005
Portfolio Expected Return: 0.075
Portfolio Volatility: nan
Portfolio Downside Risk: nan
Portfolio Value at Risk: nan
Confidence level of Value at Risk: 95.00 %
Portfolio Sharpe Ratio: nan
Portfolio Sortino Ratio: nan

Skewness:
AMZN DIS GOOG MCD
0 0.987787 NaN NaN NaN

Kurtosis:
AMZN DIS GOOG MCD
0 -0.463871 NaN NaN NaN

Information:
Allocation Name
0 0.25 AMZN
1 0.25 DIS
2 0.25 GOOG
3 0.25 MCD

I tried

pf = build_portfolio(data=data), where I feed my own data, but the same behaviour is observed.

Similarlly
pf.returns.daily_returns() gives NaNs for all but the first column

finquant.returns.daily_returns(data) produces correct returns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant