payoff
Get payoff ratio
Source Code: [link]
openbb.portfolio.metric.payoff(portfolio_engine: portfolio_engine.PortfolioEngine)
Parameters
This function does not take any parameters.
Returns
Type | Description |
---|---|
pd.DataFrame | DataFrame of payoff ratio of the portfolio during different time periods |
Examples
from openbb_terminal.sdk import openbb
p = openbb.portfolio.load("openbb_terminal/miscellaneous/portfolio/holdings_example.xlsx")
output = openbb.portfolio.metric.payoff(p)
During some time periods there were no losing trades. Thus some values could not be calculated.