mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-07 01:41:17 +00:00
* Adding versioning to docs --------- Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: tehcoderer <me@tehcoderer.com>
1.5 KiB
Vendored
1.5 KiB
Vendored
title, description
| title | description |
|---|---|
| sharpe | OpenBB SDK Function |
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
sharpe
Calculates the sharpe ratio
Source Code: [link]
openbb.qa.sharpe(data: pd.DataFrame, rfr: float = 0, window: float = 252)
Parameters
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| data | pd.DataFrame | selected dataframe column | None | False |
| rfr | float | risk free rate | 0 | True |
| window | float | length of the rolling window | 252 | True |
Returns
| Type | Description |
|---|---|
| pd.DataFrame | sharpe ratio |
Plots Calculated the sharpe ratio
Source Code: [link]
openbb.qa.sharpe_chart(data: pd.DataFrame, rfr: float = 0, window: float = 252)
Parameters
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| data | pd.DataFrame | selected dataframe column | None | False |
| rfr | float | risk free rate | 0 | True |
| window | float | length of the rolling window | 252 | True |
Returns
This function does not return anything