JuliaComputing / Miletus.jl

Writing financial contracts in Julia
https://juliahub.com/ui/Packages/Miletus/Sk1m2/
Other
84 stars 23 forks source link

typos #16

Closed spaette closed 12 months ago

spaette commented 1 year ago

I'll submit a PR contingent on the following:

  1. pending clarification of what the fixes would be (if any) for examples.md and termstructure.jl
  2. if the other provided fixes look correct

The string Structing looks like a typo.

$ ed -s Miletus.jl/docs/src/examples.md <<<'568,582p'
## Asian Option pricing
Asian options are structures whose payoff depends on the average price of an underlying security over a specific period of time, not just the price of the underlying at maturity.  To price an Asian option, we will make use of a Monte Carlo pricing model, as well as a contract that considers a `MovingAveragePrice`

```@example asianoption
using Miletus, Gadfly, Colors, Dates

d1 = Dates.today()
d2 = d1 + Dates.Day(120)

Structing the model without currency units

m = GeomBMModel(d1, 100.00, 0.05, 0.0, 0.3)
mcm = montecarlo(m, d1:Day(1):d2, 100_000)

$


The string `TermStuct` looks like a typo.

$ grep -nr TermStuct Miletus.jl Miletus.jl/src/termstructure.jl:65:abstract type TermStuct end Miletus.jl/src/termstructure.jl:67:abstract type VolatilityTermStructure <: TermStuct end Miletus.jl/src/termstructure.jl:68:abstract type YieldTermStructure <: TermStuct end $


Primitive
adjust
acquisition
cancellation
continuously
continuously
continuously
contracts
implemented
increment
initial
interchangeable

$ grep -nr Primative Miletus.jl Miletus.jl/docs/src/tutorial.md:125:### Primative Observables $ grep -nr adust Miletus.jl
Miletus.jl/src/daycounts.jl:254:adust(::Unadjusted, c::BusinessDays.HolidayCalendar, d::Date) = d $ grep -nr aquisition Miletus.jl Miletus.jl/src/contracts.jl:67:If p is true at the point of aquisition, acquire c1 else acquire c2. $ grep -nr cancelation Miletus.jl Miletus.jl/src/utils/ivol.jl:47: β₂ = 0.5 - KΦ(-s₂) # cancelation of some terms $ grep -nr continously Miletus.jl Miletus.jl/src/models/geombm.jl:13:The interestrate, carryrate and volatility are all specified on a continously compounded, Actual/365 basis. Miletus.jl/src/models/core.jl:22:The yieldcurve and carryrate are all specified on a continously compounded, Actual/365 basis. Miletus.jl/docs/src/tutorial.md:379: The interestrate, carryrate and volatility are all specified on a continously compounded, Actual/365 basis. $ grep -nr contracs Miletus.jl Miletus.jl/src/multipleexercise.jl:5:move up or down states. This can represent a variety of multiple exercise contracs, such $ grep -nr implmented Miletus.jl Miletus.jl/docs/src/tutorial.md:335: TermStruct - An abstract type that is a super type to all Term Structures implmented in Miletus $ grep -nr incrememnt Miletus.jl Miletus.jl/src/utils/ivol.jl:221:The update incrememnt for nth order Householder's method (where n is the number of arguments) for finding the root of $ grep -nr inital Miletus.jl Miletus.jl/src/models/binomial.jl:14: S₀ : inital value Miletus.jl/docs/src/tutorial.md:396: * S₀ : inital value $ grep -nr interchangable Miletus.jl Miletus.jl/src/utils/ivol.jl:266:Note: for the purposes of computation, the bounds are actually interchangable (i.e. x₋ can be the upper bound). $

aviks commented 12 months ago

examples.md - Structing - should be "Constructing" TermStruct would have been better as TermStructure probably, but best left as is for now. I'll have to investigate if we can change that without too much hassle.

Other changes look OK.

Thanks for doing this.

spaette commented 12 months ago

@aviks

Any further comment noting the piped output?

$ git clone -q https://github.com/vaerksted/Miletus.jl.git
$ grep -nr TermStruct Miletus.jl | wc -l
47
$ grep -nr TermStuct Miletus.jl | wc -l
3
$ 
spaette commented 12 months ago

PR marked as a Draft pending a response to the previous comment.

aviks commented 12 months ago

Any further comment noting the piped output?

Ah, I now understand what you meant. Thanks! I've made a PR for that: #18