Description Usage Arguments Value Examples

Calculates Sharpe ratio from vector of gains or prices. The formula is:
`(mean(gains) - rf) / sd(gains)`

, where `rf`

is some risk-free rate
of return.

1 |

`gains` |
Numeric matrix with 1 column of gains for each investment (can be a vector if there is only one). |

`prices` |
Numeric matrix with 1 column of prices for each investment (can be a vector if there is only one). |

`rf` |
Numeric value. |

Numeric value.

1 2 3 4 5 6 |

vandomed/stocks documentation built on Jan. 10, 2019, 7:34 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.