Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation for new methods #48

Merged
merged 1 commit into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
LsqFit = "2fda8390-95c7-5789-9bda-21331edee243"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
ProgressBars = "49802e3a-d2f1-5c88-81d8-b72133a6f568"
Expand Down
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ makedocs(
"analytics/analytics.md",
"examples/examples.md",
"models/models.md",
"models/rates_models.md",
"paths/paths.md",
"payoffs/payoffs.md",
"products/products.md",
Expand Down
4 changes: 4 additions & 0 deletions docs/src/examples/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

In this section we document data and functions to work with the product and model examples.

```@docs
DiffFusion.Examples._csv_path
```

```@docs
DiffFusion.Examples.examples
```
Expand Down
74 changes: 12 additions & 62 deletions docs/src/models/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ DiffFusion.GaussianHjmModel
```

```@docs
DiffFusion.gaussian_hjm_model
DiffFusion.gaussian_hjm_model(
alias::String,
delta::DiffFusion.ParameterTermstructure,
chi::DiffFusion.ParameterTermstructure,
sigma_f::DiffFusion.BackwardFlatVolatility,
correlation_holder::Union{DiffFusion.CorrelationHolder, Nothing},
quanto_model::Union{DiffFusion.AssetModel, Nothing},
)
```

```@docs
Expand Down Expand Up @@ -120,6 +127,10 @@ DiffFusion.log_future
DiffFusion.forward_rate_variance
```

```@docs
DiffFusion.swap_rate_variance
```

## Model Functions for Simulation

```@docs
Expand Down Expand Up @@ -188,64 +199,3 @@ DiffFusion.quanto_drift
DiffFusion.asset_variance
```

## Additional Rates Model Functions

```@docs
DiffFusion.func_y
```

```@docs
DiffFusion.chi_hjm
```

```@docs
DiffFusion.benchmark_times
```

```@docs
DiffFusion.H_hjm
```

```@docs
DiffFusion.G_hjm
```

```@docs
DiffFusion.benchmark_times_scaling
```

```@docs
DiffFusion.func_Theta_x
```

```@docs
DiffFusion.func_Theta_x_integrate_y
```

```@docs
DiffFusion.func_Theta_s
```

```@docs
DiffFusion.func_Theta
```

```@docs
DiffFusion.func_H_T
```

```@docs
DiffFusion.func_H_T_dense
```

```@docs
DiffFusion.func_Sigma_T
```

```@docs
DiffFusion.GaussianHjmModelVolatility
```

```@docs
DiffFusion.swap_rate_variance
```
115 changes: 115 additions & 0 deletions docs/src/models/rates_models.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Additional Rates Model Functions

## Model Functions for Simulation

```@docs
DiffFusion.func_y
```

```@docs
DiffFusion.chi_hjm
```

```@docs
DiffFusion.benchmark_times
```

```@docs
DiffFusion.H_hjm
```

```@docs
DiffFusion.G_hjm
```

```@docs
DiffFusion.benchmark_times_scaling
```

```@docs
DiffFusion.func_Theta_x
```

```@docs
DiffFusion.func_Theta_x_integrate_y
```

```@docs
DiffFusion.func_Theta_s
```

```@docs
DiffFusion.func_Theta
```

```@docs
DiffFusion.func_H_T
```

```@docs
DiffFusion.func_H_T_dense
```

```@docs
DiffFusion.func_Sigma_T
```

## Swap Rate Volatility Calculation

```@docs
DiffFusion.GaussianHjmModelVolatility
```

```@docs
DiffFusion.swap_rate_gradient
```

```@docs
DiffFusion.swap_rate_instantaneous_covariance
```

```@docs
DiffFusion.swap_rate_volatility²
```

```@docs
DiffFusion.swap_rate_covariance
```

```@docs
DiffFusion.swap_rate_correlation
```

```@docs
DiffFusion.model_implied_volatilties
```

## Model Calibration

```@docs
DiffFusion.gaussian_hjm_model(
alias::String,
ch::Union{DiffFusion.CorrelationHolder, Nothing},
option_times::AbstractVector,
swap_maturities::AbstractVector,
swap_rate_volatilities::AbstractMatrix,
yts::DiffFusion.YieldTermstructure;
max_iter::Integer = 5,
volatility_regularisation::ModelValue = 0.0,
)
```

```@docs
DiffFusion.gaussian_hjm_model(
alias::String,
delta::DiffFusion.ParameterTermstructure,
chi::DiffFusion.ParameterTermstructure,
ch::Union{DiffFusion.CorrelationHolder, Nothing},
option_times::AbstractVector,
swap_maturities::AbstractVector,
swap_rate_volatilities::AbstractMatrix,
yts::DiffFusion.YieldTermstructure;
max_iter::Integer = 5,
volatility_regularisation::ModelValue = 0.0,
)
```
34 changes: 34 additions & 0 deletions docs/src/payoffs/payoffs.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,40 @@ DiffFusion.CompoundedRate(
)
```

```@docs
DiffFusion.Optionlet
```

```@docs
DiffFusion.Optionlet(
obs_time_::ModelTime,
expiry_time::ModelTime,
forward_rate::Union{DiffFusion.LiborRate, DiffFusion.CompoundedRate},
strike_rate::DiffFusion.Payoff,
call_put::ModelValue,
gearing_factor::DiffFusion.Payoff = DiffFusion.Fixed(1.0),
)
```

```@docs
DiffFusion.Swaption
```

```@docs
DiffFusion.Swaption(
obs_time_::ModelTime,
expiry_time::ModelTime,
settlement_time::ModelTime,
forward_rates::AbstractVector,
fixed_times::AbstractVector,
fixed_weights::AbstractVector,
fixed_rate::ModelValue,
payer_receiver::ModelValue,
disc_key::String,
)
```



## American Monte Carlo Payoffs

Expand Down
Loading