Skip to content

Commit

Permalink
Merge pull request #17 from vaerksted/master
Browse files Browse the repository at this point in the history
fix typos
  • Loading branch information
aviks authored Dec 7, 2023
2 parents 29b9a77 + 6770486 commit 4e0e63a
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/src/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ d1 = Dates.today()
d2 = d1 + Dates.Day(120)
```

Structing the model without currency units
Constructing the model without currency units
```@example asianoption
m = GeomBMModel(d1, 100.00, 0.05, 0.0, 0.3)
mcm = montecarlo(m, d1:Day(1):d2, 100_000)
Expand Down
6 changes: 3 additions & 3 deletions docs/src/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ The set of `Contract` primitives includes the following types:

* A contract that acts like contract `c` until `p` is `true`, at which point the object is abandoned, and hence becomes worthless.

### Primative Observables
### Primitive Observables

Like `Contract`, `Observable{T}` is defined as an abstract type. Specific instances of an `Observable` type are objects, possibly time-varying, and possibly unknown at contracting time, for which a direct measurement can be made. Example observable quantities include date, price, temperature, population or other objects that can be objectively measured.

Expand Down Expand Up @@ -376,7 +376,7 @@ The `Contract` and `Observable` primitives described previously are used for set
* for commodities this is typically negative (i.e. cost-of-carry)
* `volatility`:

* The `interestrate`, `carryrate` and `volatility` are all specified on a continously compounded, Actual/365 basis.
* The `interestrate`, `carryrate` and `volatility` are all specified on a continuously compounded, Actual/365 basis.
* The price is assumed to follow the PDE:
$dS_t = (\kappa - \sigma^2/2) S_t dt + \sigma S_t dW_t$
* where $W_t$ is a Wiener process, and `κ = interestrate - carryrate`.
Expand All @@ -393,7 +393,7 @@ The `Contract` and `Observable` primitives described previously are used for set
* `startdate` : start date of process
* `enddate` : end date of process
* `nsteps` : number of steps in the tree
* `S₀` : inital value
* `S₀` : initial value
* `Δt` : the time-difference between steps, typically `days(startdate - enddate) / (365*nsteps)`
* `iR` : discount rate, `exp(-Δt*interestrate)`
* `u` : scale factor for up
Expand Down
2 changes: 1 addition & 1 deletion src/contracts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ end
"""
Cond(p::Observable{Bool}, c1::Contract, c2::Contract)
If `p` is true at the point of aquisition, acquire `c1` else acquire `c2`.
If `p` is true at the point of acquisition, acquire `c1` else acquire `c2`.
"""
struct Cond{P<:Observable{Bool}, T1<:Contract, T2<:Contract} <: Contract
p::P
Expand Down
2 changes: 1 addition & 1 deletion src/daycounts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ struct Preceding <: DateRoll; end
struct ModPreceding <: DateRoll; end


adust(::Unadjusted, c::BusinessDays.HolidayCalendar, d::Date) = d
adjust(::Unadjusted, c::BusinessDays.HolidayCalendar, d::Date) = d

function adjust(::ModFollowing, c::BusinessDays.HolidayCalendar, dt::Date)
newDt=adjust(Following(), c, dt)
Expand Down
2 changes: 1 addition & 1 deletion src/models/binomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Arguments:
* `startdate` : start date of process
* `enddate` : start date of process
* `nsteps` : number of steps in the tree
* `S₀` : inital value
* `S₀` : initial value
* `Δt` : the time-difference between steps, typically `days(startdate - enddate) / (365*nsteps)`
* `iR` : discount rate, `exp(-Δt*interestrate)`
* `u` : scale factor for up
Expand Down
2 changes: 1 addition & 1 deletion src/models/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Contains the core parameters for the model of `SingleStock`:
- for stocks this is typically positive (i.e. dividends)
- for commodities this is typically negative (i.e. cost-of-carry)
The `yieldcurve` and `carryrate` are all specified on a continously compounded, Actual/365 basis.
The `yieldcurve` and `carryrate` are all specified on a continuously compounded, Actual/365 basis.
The exact dynamics of the model are unspecified, but has the property that
Expand Down
2 changes: 1 addition & 1 deletion src/models/geombm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A model for `SingleStock`, following a geometric Brownian motion.
- for commodities this is typically negative (i.e. cost-of-carry)
* `volatility`:
The `interestrate`, `carryrate` and `volatility` are all specified on a continously compounded, Actual/365 basis.
The `interestrate`, `carryrate` and `volatility` are all specified on a continuously compounded, Actual/365 basis.
The price is assumed to follow the PDE:
Expand Down
2 changes: 1 addition & 1 deletion src/multipleexercise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
LatticeStateContract
Represents a contract with multiple states, where at each exercise date the holder may
move up or down states. This can represent a variety of multiple exercise contracs, such
move up or down states. This can represent a variety of multiple exercise contracts, such
as storage options.
- `transition`: a square matrix of contracts: at each exercise date, the contract
Expand Down
6 changes: 3 additions & 3 deletions src/utils/ivol.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function _black_ivol(K, β)
logK = log(K)
x = -logK
s₂ = sqrt(-2*x) # point of inflection
β₂ = 0.5 - K*Φ(-s₂) # cancelation of some terms
β₂ = 0.5 - K*Φ(-s₂) # cancellation of some terms
ν₂ = oftype(β₂,invsqrt2π)
if β < β₂
s₁ = s₂ - β₂/ν₂
Expand Down Expand Up @@ -218,7 +218,7 @@ end
"""
householder_update(N, [H2, [H3]])
The update incrememnt for `n`th order Householder's method (where `n` is the number of arguments) for finding the root of
The update increment for `n`th order Householder's method (where `n` is the number of arguments) for finding the root of
f(x) == 0
Expand Down Expand Up @@ -263,7 +263,7 @@ If `d₋ < Δ < d₊`, then the interpolant is convex if and only if
[DG85, eq. 3.18].
Note: for the purposes of computation, the bounds are actually interchangable (i.e. `x₋` can be the upper bound).
Note: for the purposes of computation, the bounds are actually interchangeable (i.e. `x₋` can be the upper bound).
References
Expand Down

0 comments on commit 4e0e63a

Please sign in to comment.