diff --git a/docs/src/api.md b/docs/src/api.md index 7d9acc6..c3e0218 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -2,6 +2,27 @@ ## Portfolio analytics +### Asset return + +```@docs +OnlinePortfolioAnalytics.SimpleAssetReturn +OnlinePortfolioAnalytics.LogAssetReturn +``` + +### Mean return + +### Cumulative return + +### Standard deviation + +### Drawdowns + +### Statistical moments + +### Sharpe ratio + +### Sortino ration + ## Other ```@docs diff --git a/src/OnlinePortfolioAnalytics.jl b/src/OnlinePortfolioAnalytics.jl index b5d16f4..05577e9 100644 --- a/src/OnlinePortfolioAnalytics.jl +++ b/src/OnlinePortfolioAnalytics.jl @@ -1,3 +1,20 @@ +""" +[`OnlinePortfolioAnalytics`](@ref) module aims to provide users with functionality for performing quantitative portfolio analytics via [online algorithms](https://en.wikipedia.org/wiki/Online_algorithm). + +[`EXPORTS`](@ref) +$(EXPORTS) + +[`IMPORTS`](@ref) +$(IMPORTS) + +--- + +$(README) + +--- + +The [`LICENSE`](@ref) abbreviation can be used in the same way for the `LICENSE.md` file. +""" module OnlinePortfolioAnalytics using OnlineStatsBase diff --git a/src/asset_return.jl b/src/asset_return.jl index f248f55..ce390da 100644 --- a/src/asset_return.jl +++ b/src/asset_return.jl @@ -1,3 +1,6 @@ +""" + S +""" mutable struct SimpleAssetReturn{T} <: PortfolioAnalytics{T} value::Union{Missing,T} n::Int @@ -28,6 +31,24 @@ function OnlineStatsBase._fit!(stat::SimpleAssetReturn, data) end end +""" +The [`TYPEDEF`](@ref) abbreviation includes the type signature: + +$(TYPEDEF) + +--- + +The [`FIELDS`](@ref) abbreviation creates a list of all the fields of the type. +If the fields has a docstring attached, that will also get included. + +$(FIELDS) + +--- + +[`TYPEDFIELDS`](@ref) also adds in types for the fields: + +$(TYPEDFIELDS) +""" mutable struct LogAssetReturn{T} <: PortfolioAnalytics{T} value::Union{Missing,T} n::Int