Skip to content

Commit

Permalink
WIP Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
femtotrader committed Apr 24, 2024
1 parent 75dd52d commit 32996c1
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions src/OnlinePortfolioAnalytics.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
21 changes: 21 additions & 0 deletions src/asset_return.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""
S
"""
mutable struct SimpleAssetReturn{T} <: PortfolioAnalytics{T}
value::Union{Missing,T}
n::Int
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 32996c1

Please sign in to comment.