-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs update to strict docs build (#164)
* WIP docs update to strict docs build * more doc cleanup * strict build * last tweaks?
- Loading branch information
1 parent
5b3630e
commit d87a43a
Showing
27 changed files
with
342 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
FinanceCore = "b9b1ffdd-6612-4b69-8227-7663be06e089" | ||
FinanceModels = "77f2ae65-bdde-421f-ae9d-22f1af19dd76" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[deps] | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
FinanceCore = "b9b1ffdd-6612-4b69-8227-7663be06e089" | ||
FinanceModels = "77f2ae65-bdde-421f-ae9d-22f1af19dd76" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ using FinanceModels | |
using Documenter | ||
|
||
makedocs(; | ||
modules=[FinanceModels], | ||
modules=[FinanceModels, FinanceCore], | ||
authors="Alec Loudenback <[email protected]> and contributors", | ||
repo="https://github.com/JuliaActuary/FinanceModels.jl/blob/{commit}{path}#L{line}", | ||
repo=Remotes.GitHub("JuliaActuary", "FinanceModels.jl"), | ||
sitename="FinanceModels.jl", | ||
format=Documenter.HTML(; | ||
prettyurls=get(ENV, "CI", "false") == "true", | ||
|
@@ -13,11 +13,24 @@ makedocs(; | |
), | ||
pages=[ | ||
"Home" => "index.md", | ||
"Guide" => "guide.md", | ||
"Contracts" => "contracts.md", | ||
"Models, Valuation, and Fitting" => "models.md", | ||
"API Reference" => "api.md", | ||
"Migration Guide" => "migration.md", | ||
"Guide" => [ | ||
"Introduction" => "introduction.md", | ||
"Models, Valuation, and Fitting" => "models.md", | ||
"Contracts" => "contracts.md", | ||
"Rates" => "Rates.md", | ||
"Migration Guide" => "migration.md", | ||
], | ||
"Modules" => [ | ||
"FinanceModels" => "API/FinanceModels.md", | ||
"FinanceCore" => "API/FinanceCore.md", | ||
"Spline" => "API/Spline.md", | ||
"Fit" => "API/Fit.md", | ||
"Yield" => "API/Yield.md", | ||
"Bond" => "API/Bond.md", | ||
"Equity" => "API/Equity.md", | ||
"Option" => "API/Option.md", | ||
"Volatility" => "API/Volatility.md", | ||
], | ||
"FAQs" => "faq.md", | ||
] | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# FinanceModels.Bond API Reference | ||
|
||
```@index | ||
Modules = [FinanceModels.Bond] | ||
``` | ||
|
||
## Exported API | ||
```@autodocs | ||
Modules = [FinanceModels.Bond] | ||
Private = false | ||
``` | ||
|
||
## Unexported API | ||
```@autodocs | ||
Modules = [FinanceModels.Bond] | ||
Public = false | ||
``` | ||
|
||
Please [open an issue](https://github.com/JuliaActuary/FinanceModels.jl/issues) if you encounter any issues or confusion with the package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# FinanceModels.Equity API Reference | ||
|
||
```@index | ||
Modules = [FinanceModels.Equity] | ||
``` | ||
|
||
## Exported API | ||
```@autodocs | ||
Modules = [FinanceModels.Equity] | ||
Private = false | ||
``` | ||
|
||
## Unexported API | ||
```@autodocs | ||
Modules = [FinanceModels.Equity] | ||
Public = false | ||
``` | ||
|
||
Please [open an issue](https://github.com/JuliaActuary/FinanceModels.jl/issues) if you encounter any issues or confusion with the package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# FinanceCore API Reference | ||
|
||
```@index | ||
Modules = [FinanceCore] | ||
``` | ||
|
||
## Exported API | ||
```@autodocs | ||
Modules = [FinanceCore] | ||
Private = false | ||
``` | ||
|
||
## Unexported API | ||
```@autodocs | ||
Modules = [FinanceCore] | ||
Public = false | ||
``` | ||
|
||
Please [open an issue](https://github.com/JuliaActuary/FinanceModels.jl/issues) if you encounter any issues or confusion with the package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# FinanceModels API Reference | ||
|
||
```@index | ||
Modules = [FinanceModels] | ||
``` | ||
|
||
## Exported API | ||
```@autodocs | ||
Modules = [FinanceModels] | ||
Private = false | ||
``` | ||
|
||
## Unexported API | ||
```@autodocs | ||
Modules = [FinanceModels] | ||
Public = false | ||
``` | ||
|
||
Please [open an issue](https://github.com/JuliaActuary/FinanceModels.jl/issues) if you encounter any issues or confusion with the package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# FinanceModels.Fit API Reference | ||
|
||
```@index | ||
Modules = [FinanceModels.Fit] | ||
``` | ||
|
||
## Exported API | ||
```@autodocs | ||
Modules = [FinanceModels.Fit] | ||
Private = false | ||
``` | ||
|
||
## Unexported API | ||
```@autodocs | ||
Modules = [FinanceModels.Fit] | ||
Public = false | ||
``` | ||
|
||
Please [open an issue](https://github.com/JuliaActuary/FinanceModels.jl/issues) if you encounter any issues or confusion with the package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# FinanceModels.Option API Reference | ||
|
||
```@index | ||
Modules = [FinanceModels.Option] | ||
``` | ||
|
||
## Exported API | ||
```@autodocs | ||
Modules = [FinanceModels.Option] | ||
Private = false | ||
``` | ||
|
||
## Unexported API | ||
```@autodocs | ||
Modules = [FinanceModels.Option] | ||
Public = false | ||
``` | ||
|
||
Please [open an issue](https://github.com/JuliaActuary/FinanceModels.jl/issues) if you encounter any issues or confusion with the package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# FinanceModels.Spline API Reference | ||
|
||
```@index | ||
Modules = [FinanceModels.Spline] | ||
``` | ||
|
||
## Exported API | ||
```@autodocs | ||
Modules = [FinanceModels.Spline] | ||
Private = false | ||
``` | ||
|
||
## Unexported API | ||
```@autodocs | ||
Modules = [FinanceModels.Spline] | ||
Public = false | ||
``` | ||
|
||
Please [open an issue](https://github.com/JuliaActuary/FinanceModels.jl/issues) if you encounter any issues or confusion with the package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# FinanceModels.Volatility API Reference | ||
|
||
```@index | ||
Modules = [FinanceModels.Volatility] | ||
``` | ||
|
||
## Exported API | ||
```@autodocs | ||
Modules = [FinanceModels.Volatility] | ||
Private = false | ||
``` | ||
|
||
## Unexported API | ||
```@autodocs | ||
Modules = [FinanceModels.Volatility] | ||
Public = false | ||
``` | ||
|
||
Please [open an issue](https://github.com/JuliaActuary/FinanceModels.jl/issues) if you encounter any issues or confusion with the package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# FinanceModels.Yield API Reference | ||
|
||
```@index | ||
Modules = [FinanceModels.Yield] | ||
``` | ||
|
||
## Exported API | ||
```@autodocs | ||
Modules = [FinanceModels.Yield] | ||
Private = false | ||
``` | ||
|
||
## Unexported API | ||
```@autodocs | ||
Modules = [FinanceModels.Yield] | ||
Public = false | ||
``` | ||
|
||
Please [open an issue](https://github.com/JuliaActuary/FinanceModels.jl/issues) if you encounter any issues or confusion with the package. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
## Rates | ||
|
||
We should first discuss `Rate`s, which are reexported from [`FinanceCore.jl`](https://github.com/JuliaActuary/FinanceCore.jl) | ||
|
||
Rates are types that wrap scalar values to provide information about how to determine `discount` and `accumulation` factors. These allow for explicit handling of rate compounding conventions which, if not explicit, is often a source of errors in practice. | ||
|
||
There are two `Frequency` types: | ||
|
||
- `Yields.Periodic(m)` for rates that compound `m` times per period (e.g. `m` times per year if working with annual rates). | ||
- `Yields.Continuous()` for continuously compounding rates. | ||
|
||
#### Examples | ||
|
||
```julia | ||
Continuous(0.05) # 5% continuously compounded | ||
Periodic(0.05,2) # 5% compounded twice per period | ||
``` | ||
|
||
These are both subtypes of the parent `Rate` type and are instantiated as: | ||
|
||
```julia | ||
Rate(0.05,Continuous()) # 5% continuously compounded | ||
Rate(0.05,Periodic(2)) # 5% compounded twice per period | ||
``` | ||
|
||
Broadcast over a vector to create `Rates` with the given compounding: | ||
|
||
```julia | ||
Periodic.([0.02,0.03,0.04],2) | ||
Continuous.([0.02,0.03,0.04]) | ||
``` | ||
|
||
Rates can also be constructed by specifying the `CompoundingFrequency` and then passing a scalar rate: | ||
|
||
```julia | ||
Periodic(1)(0.05) | ||
Continuous()(0.05) | ||
``` | ||
|
||
#### Conversion | ||
|
||
Convert rates between different types with `convert`. E.g.: | ||
|
||
```julia | ||
r = Rate(0.01,Periodic(12)) # rate that compounds 12 times per rate period (ie monthly) | ||
|
||
convert(Yields.Periodic(1),r) # convert monthly rate to annual effective | ||
convert(Yields.Continuous(),r) # convert monthly rate to continuous | ||
``` | ||
|
||
To get the scalar value out of the `Rate`, use `FinanceModels.rate(r)`: | ||
|
||
```julia-rel | ||
julia> r = Rate(0.01,Periodic(12)); | ||
julia> rate(r) | ||
0.01 | ||
``` | ||
|
||
#### Arithmetic | ||
|
||
Adding, subtracting, multiplying, dividing, and comparing rates is supported. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.