Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MarcusRainbow/QuantMath
/ functions
Functions
887 in github.com/MarcusRainbow/QuantMath
⨍
Functions
887
◇
Types & classes
167
↓ 3 callers
Method
vega
(&self)
src/risk/vegavolga.rs:101
↓ 3 callers
Method
volatilities
( &self, strikes: &[f64], volatilities: &mut[f64])
src/data/volsmile.rs:42
↓ 3 callers
Method
volga
(&self)
src/risk/vegavolga.rs:102
↓ 3 callers
Function
zbrent
Brent's method of root-finding, based on the implementation given in Numerical Recipes in C by Press, Teukolsky, Vetterling and Flannery. The algorith
src/math/brent.rs:12
↓ 2 callers
Method
add
Adds a subgenerator, for example calculating delta within the time-forward context.
src/risk/timebumped.rs:108
↓ 2 callers
Method
add_instrument
(&mut self, instrument: &RcInstrument)
src/risk/dependencies.rs:92
↓ 2 callers
Method
apply
(&self, surface: RcVolSurface)
src/data/bumpvol.rs:59
↓ 2 callers
Method
as_bumpable
(&self)
src/pricers/selfpricer.rs:99
↓ 2 callers
Function
as_currency
See documentation for as_instrument
src/facade/handle.rs:235
↓ 2 callers
Method
as_mc_priceable
(&self)
src/instruments/options.rs:339
↓ 2 callers
Method
as_mut_bumpable
(&mut self)
src/models/blackdiffusion.rs:483
↓ 2 callers
Function
as_reports
Converts the handle into a vector of reports. Unlike the other methods in this module, this also frees the handle that is passed in.
src/facade/handle.rs:261
↓ 2 callers
Function
assert_approx
(value: f64, expected: f64)
src/instruments/basket.rs:269
↓ 2 callers
Function
assert_approx
(value: f64, expected: f64, tolerance: f64)
src/data/volsurface.rs:1037
↓ 2 callers
Function
assert_approx_eq_reports
Checks that the two supplied JSON strings are sufficiently close, given the tolerances. The strings should contain vectors of reports.
src/facade/mod.rs:170
↓ 2 callers
Function
assert_step
(calendar: &Calendar, stepped: Date, manual: Date, from: Date, count: f64, exact: bool)
src/dates/calendar.rs:798
↓ 2 callers
Method
base_date
The date to which all dividends are discounted, and from which all accruals are counted.
src/data/divstream.rs:306
↓ 2 callers
Method
bumpsize
(&self)
src/data/bumpvol.rs:31
↓ 2 callers
Function
calculate
Performs a calculation, outputting the price, and writing any reports that are requested.
src/facade/mod.rs:133
↓ 2 callers
Method
call_price
Calculates the PV of a European call option under Black Scholes
src/math/optionpricing.rs:23
↓ 2 callers
Function
check_fixed_european_value
(spot: f64, strike_fraction: f64, strike_date: DateTime, expiry: DateTime, put_or_call: PutOrC
src/instruments/options.rs:953
↓ 2 callers
Method
clone_box
(&self)
src/risk/mod.rs:69
↓ 2 callers
Method
control
(&self)
src/core/dedup.rs:61
↓ 2 callers
Function
create_dependencies
(instrument: &RcInstrument, spot_date: Date)
src/risk/cache.rs:397
↓ 2 callers
Function
create_sample_bootstrap
(div_stream: &DividendStream, hwm: Date)
src/data/divstream.rs:494
↓ 2 callers
Function
create_sample_borrow
()
src/risk/marketdata.rs:497
↓ 2 callers
Function
create_sample_borrow
()
examples/montecarlo.rs:80
↓ 2 callers
Function
create_sample_divstream
()
src/risk/marketdata.rs:468
↓ 2 callers
Function
create_sample_divstream
()
examples/montecarlo.rs:51
↓ 2 callers
Function
create_sample_flat_vol
()
src/risk/marketdata.rs:505
↓ 2 callers
Function
create_sample_flat_vol
()
examples/montecarlo.rs:88
↓ 2 callers
Function
create_sample_rate
()
src/risk/marketdata.rs:489
↓ 2 callers
Function
create_sample_rate
()
examples/montecarlo.rs:72
↓ 2 callers
Method
credit_id
(&self)
src/instruments/bonds.rs:69
↓ 2 callers
Function
d_plus_minus
Calculates the internal d_plus and d_minus values needed for many of the Black Scholes formulae.
src/math/optionpricing.rs:49
↓ 2 callers
Function
dedup_map_from_slice
Utility function to convert a slice of objects that support InstanceId into a HashMap. We do this rather than using a HashSet and relying on the objec
src/core/dedup.rs:301
↓ 2 callers
Method
deref
(&self)
src/core/factories.rs:78
↓ 2 callers
Method
displacement
(&self, _date: Date)
src/data/volsurface.rs:452
↓ 2 callers
Method
div_yield
(&self)
src/data/divstream.rs:125
↓ 2 callers
Method
evaluate_flows
(&self, quantities: ArrayView2<f64>)
src/models/blackdiffusion.rs:498
↓ 2 callers
Method
extrapolate
(&self, pillar: usize, date_time: DateDayFraction, strikes: &[f64], mut out:
src/data/volsurface.rs:660
↓ 2 callers
Function
fail_or_succeed
(ok: bool)
src/core/qm.rs:88
↓ 2 callers
Function
fetch_path
(instrument: &Instrument, context: &PricingContext, observations: &[DateDayFraction], correlated_gaussians
src/models/blackdiffusion.rs:408
↓ 2 callers
Function
fetch_paths
( observations: &[DateDayFraction], correlated_gaussians: &Array3<f64>, context: &PricingContext,
src/models/blackdiffusion.rs:379
↓ 2 callers
Function
find_cached_data
Look for market-data-derived objects in the cache. If they are not there, it means that the instrument lied about its dependencies, so return an error
src/risk/cache.rs:212
↓ 2 callers
Method
fix
(&self, fixing_table: &FixingTable)
src/instruments/basket.rs:96
↓ 2 callers
Function
fix_all
Utility method to fix all instruments in a vector, returning them as a weighted vector. Currently we do not attempt to net instruments of the same typ
src/instruments/mod.rs:138
↓ 2 callers
Method
fixing
(&mut self, id: &str, date: DateTime)
src/risk/dependencies.rs:167
↓ 2 callers
Method
flow
(&mut self, instrument: &RcInstrument)
src/models/mod.rs:148
↓ 2 callers
Method
forward
(&self)
src/data/voldecorators.rs:69
↓ 2 callers
Method
forward_curve
(&self, instrument: &Instrument, _high_water_mark: Date)
src/instruments/options.rs:662
↓ 2 callers
Method
forward_id_by_credit_id
(&self, credit_id: &str)
src/risk/dependencies.rs:71
↓ 2 callers
Function
from_handle
Converts a result containing either a handle or an error into a u64. The u64 is the address of a small heap-allocated object that contains the referen
src/facade/handle.rs:211
↓ 2 callers
Method
generate
(&self, pricer: &mut dyn Pricer, saveable: &mut dyn Saveable, unbumped: f64)
src/risk/timebumped.rs:122
↓ 2 callers
Function
get_hwm
(map: &HashMap<RcInstrument, Date>, instrument: &RcInstrument)
src/risk/dependencies.rs:111
↓ 2 callers
Method
instrument_by_id
(&self, id: &str)
src/risk/dependencies.rs:67
↓ 2 callers
Method
instruments_clone
(&self)
src/risk/dependencies.rs:97
↓ 2 callers
Method
interp_cmp
(&self, other: f64)
src/math/interpolation.rs:29
↓ 2 callers
Function
linear_interpolate_extrapolate
Helper function for linear interpolation and extrapolation.
src/math/interpolation.rs:126
↓ 2 callers
Method
new
Creates a new error
src/core/qm.rs:19
↓ 2 callers
Method
new
()
src/pricers/selfpricer.rs:45
↓ 2 callers
Method
new
Constructs a factory for producing MonteCarlo pricers. We pass in the number of paths to use for the Monte-Carlo simulation, which makes a lot of sens
src/pricers/montecarlo.rs:52
↓ 2 callers
Method
new_saveable
(&self)
src/pricers/selfpricer.rs:142
↓ 2 callers
Method
new_saveable
(&self)
src/pricers/montecarlo.rs:161
↓ 2 callers
Method
new_saveable
(&self)
src/risk/deltagamma.rs:252
↓ 2 callers
Function
nr_spline
Code adapted from Numerical Recipes in C. Main changes are to make all vectors zero-based; pass in a vector of points rather than two arrays of x and
src/math/interpolation.rs:366
↓ 2 callers
Method
partial_cmp
(&self, other: &RcInstrument)
src/instruments/mod.rs:221
↓ 2 callers
Method
paths
(&self, instrument: &RcInstrument)
src/models/blackdiffusion.rs:489
↓ 2 callers
Method
pillar_variances
(&self, pillar: usize, vol_time: f64, strikes: &[f64], mut variances: &mut[f64
src/data/volsurface.rs:755
↓ 2 callers
Method
price
(&self)
src/risk/deltagamma.rs:230
↓ 2 callers
Method
put_price
Calculates the PV of a European put option under Black Scholes
src/math/optionpricing.rs:33
↓ 2 callers
Function
qm_calculate
(pricer_factory: u64, instrument: u64, fixing_table: u64, market_data: u64, number_of_report_generato
src/facade/c_interface.rs:291
↓ 2 callers
Function
qm_clone
(handle: u64)
src/facade/c_interface.rs:379
↓ 2 callers
Function
qm_currency_from_json_string
(source: *const c_char)
src/facade/c_interface.rs:115
↓ 2 callers
Function
qm_instrument_from_json_string
( source: *const c_char, dedup_ccy: QmDedupControl, number_of_currencies: u32, currencies: *c
src/facade/c_interface.rs:67
↓ 2 callers
Method
raw_market_data
(&self)
src/risk/cache.rs:328
↓ 2 callers
Function
reports_from_json
Reports are normally generated by the calculate function, but this method allows us to reconstitute a vector of reports from its json representation,
src/facade/mod.rs:122
↓ 2 callers
Function
sample_currency
(step: u32)
src/risk/marketdata.rs:420
↓ 2 callers
Function
sample_equity
(currency: RcCurrency, step: u32)
src/risk/marketdata.rs:431
↓ 2 callers
Function
sample_equity_json
()
src/facade/mod.rs:269
↓ 2 callers
Function
sample_fixing_table_json
()
src/facade/mod.rs:527
↓ 2 callers
Function
sample_fixings
()
src/pricers/selfpricer.rs:183
↓ 2 callers
Function
sample_fixings
()
src/pricers/montecarlo.rs:201
↓ 2 callers
Function
sample_forward_european_json
()
src/facade/mod.rs:288
↓ 2 callers
Function
sample_market_data_json
()
src/facade/mod.rs:353
↓ 2 callers
Function
sample_pricer_factory_json
()
src/facade/mod.rs:575
↓ 2 callers
Function
sample_report_generator_json
()
src/facade/mod.rs:567
↓ 2 callers
Function
sample_results_json
()
src/facade/mod.rs:581
↓ 2 callers
Function
sample_settlement
(step: u32)
src/risk/dependencies.rs:220
↓ 2 callers
Function
sample_settlement
(step: u32)
examples/montecarlo.rs:101
↓ 2 callers
Method
serialize
(&self, serializer: S)
src/instruments/mod.rs:254
↓ 2 callers
Method
serialize
(&self, serializer: S)
src/dates/mod.rs:130
↓ 2 callers
Function
set_hwm
(instrument: &RcInstrument, high_water_mark: Date, map: &mut HashMap<RcInstrument, Date>)
src/risk/dependencies.rs:185
↓ 2 callers
Function
set_hwm_by_str
(id: &str, high_water_mark: Date, map: &mut HashMap<String, Date>)
src/risk/dependencies.rs:174
↓ 2 callers
Method
settlement
(&self)
src/instruments/bonds.rs:73
↓ 2 callers
Method
spot
(&self, id: &str)
src/instruments/basket.rs:217
↓ 2 callers
Method
spot_date
(&self)
src/instruments/basket.rs:202
↓ 2 callers
Method
spot_dynamics
(&self)
src/data/bumptime.rs:15
↓ 2 callers
Method
theta
(&self)
src/risk/timebumped.rs:48
↓ 2 callers
Method
time_of_day
(&self)
src/dates/datetime.rs:52
← previous
next →
201–300 of 887, ranked by callers