Files
OpenBB/website/content/sdk/reference/qa/sharpe.md
jose-donato 2e7eb4c9b6 New documentation website (#3526)
* fix(docs): added margin between sections

* feat: removed unused files; updated ga

* fix: juan stuff doesnt work

* fix: random fix

* moon at noon

* fix: update docusaurus config

* Update controller_doc_classes.py

* fix: temp fix

* fix: temp fix

* Update controller_doc_classes.py

* fix: remove old content

* fix: taggfix

* init

* fix: styling and moved file

* Update generate_terminal_markdown.py

* fix: removed unused images

* fix: port new files

* Update generate_sdk_markdown.py

* Update controller_doc_classes.py

Co-authored-by: teh_coderer <me@tehcoderer.com>
2022-11-22 16:47:03 +00:00

77 lines
1.5 KiB
Markdown
Vendored

---
title: sharpe
description: OpenBB SDK Function
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# sharpe
<Tabs>
<TabItem value="model" label="Model" default>
Calculates the sharpe ratio
Source Code: [[link](https://github.com/OpenBB-finance/OpenBBTerminal/tree/main/openbb_terminal/common/quantitative_analysis/qa_model.py#L537)]
```python
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 |
---
</TabItem>
<TabItem value="view" label="Chart">
Plots Calculated the sharpe ratio
Source Code: [[link](https://github.com/OpenBB-finance/OpenBBTerminal/tree/main/openbb_terminal/common/quantitative_analysis/qa_view.py#L1156)]
```python
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
---
</TabItem>
</Tabs>