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
↓ 6 callers
Method
ymd
Returns the year, month and day associated with this date
src/dates/mod.rs:217
↓ 5 callers
Function
apply_bump
local helper function to apply a bump and save the old state
src/risk/marketdata.rs:320
↓ 5 callers
Method
as_any
(&self)
src/risk/timebumped.rs:30
↓ 5 callers
Method
as_any
(&self)
src/risk/deltagamma.rs:33
↓ 5 callers
Function
assert_2nd_diff
( interp: &Interpolate<f64>, x: f64, deriv: f64, expected: f64)
src/math/interpolation.rs:549
↓ 5 callers
Function
assert_approx
(value: f64, expected: f64, tolerance: f64)
src/risk/vegavolga.rs:214
↓ 5 callers
Function
check_forward_european_value
(spot: f64, strike_fraction: f64, strike_date: DateTime, expiry: DateTime, put_or_call: PutOrC
src/instruments/options.rs:913
↓ 5 callers
Method
cmp
(&self, other: &DateDayFraction)
src/dates/datetime.rs:114
↓ 5 callers
Method
forward_curve
(&self, instrument: &Instrument, _high_water_mark: Date)
src/risk/cache.rs:188
↓ 5 callers
Method
gamma
(&self)
src/risk/deltagamma.rs:94
↓ 5 callers
Method
id
(&self)
src/instruments/bonds.rs:39
↓ 5 callers
Function
manual_count
(calendar: &Calendar, from: Date, from_fraction: f64, to: Date, to_fraction: f64)
src/dates/calendar.rs:860
↓ 5 callers
Method
new_saveable
(&self)
src/risk/cache.rs:301
↓ 5 callers
Function
new_test_calendar
()
src/dates/calendar.rs:907
↓ 5 callers
Function
qm_error_string
(handle: u64)
src/facade/c_interface.rs:356
↓ 5 callers
Function
qm_free_string
(string: *mut c_char)
src/facade/c_interface.rs:371
↓ 5 callers
Function
serialize
(map: &HashMap<DateTime, f64>, serializer: S)
src/data/fixings.rs:172
↓ 5 callers
Method
spot
(&self, id: &str)
src/risk/cache.rs:183
↓ 5 callers
Method
step_partial
(&self, from: Date, step: f64, slip_forward: bool)
src/dates/calendar.rs:549
↓ 5 callers
Method
year_fraction
Calculate the year-fraction between two date-times, given the count of business days and the standard basis.
src/dates/calendar.rs:75
↓ 4 callers
Method
as_bumpable
(&self)
src/risk/deltagamma.rs:226
↓ 4 callers
Method
as_mut_time_bumpable
(&mut self)
src/pricers/selfpricer.rs:101
↓ 4 callers
Method
as_mut_time_bumpable
(&mut self)
src/pricers/montecarlo.rs:121
↓ 4 callers
Method
as_priceable
(&self)
src/instruments/bonds.rs:94
↓ 4 callers
Method
as_priceable
(&self)
src/instruments/options.rs:338
↓ 4 callers
Function
assert_approx
(value: f64, expected: f64)
src/instruments/assets.rs:524
↓ 4 callers
Method
base_date
(&self)
src/data/volsurface.rs:441
↓ 4 callers
Method
bump_time
(&mut self, bump: &BumpTime)
src/pricers/selfpricer.rs:152
↓ 4 callers
Method
bump_time
(&mut self, bump: &BumpTime)
src/pricers/montecarlo.rs:171
↓ 4 callers
Function
bumped_price
Useful method for report generators. Bumps a pricer and reprices it if necessary, returning the bumped price.
src/risk/mod.rs:268
↓ 4 callers
Function
check_bad_syntax
(text: &str)
src/dates/mod.rs:344
↓ 4 callers
Function
check_european_value
(spot: f64, strike: f64, expiry: DateTime, put_or_call: PutOrCall, expected: f64)
src/instruments/options.rs:875
↓ 4 callers
Function
consistency_check_count
(calendar: &Calendar, exact: bool)
src/dates/calendar.rs:754
↓ 4 callers
Function
consistency_check_step
(calendar: &Calendar)
src/dates/calendar.rs:823
↓ 4 callers
Function
convert_dedup
(dedup: &QmDedupControl)
src/facade/c_interface.rs:421
↓ 4 callers
Function
currency_from_json
A currency in QuantMath normally represents a literal currency such as USD. For simplicity we recommend that only major currencies are used. Thus a pe
src/facade/mod.rs:63
↓ 4 callers
Method
day_weight
(&self, date: Date)
src/dates/calendar.rs:614
↓ 4 callers
Method
dependencies
(&self)
src/risk/cache.rs:293
↓ 4 callers
Method
description
(&self)
src/core/qm.rs:25
↓ 4 callers
Method
extrapolate
(&self, value: f64)
src/math/interpolation.rs:81
↓ 4 callers
Function
from_json
(ser: &[u8], control: DedupControl, map: &HashMap<String, DrcStored>)
src/core/factories.rs:657
↓ 4 callers
Method
id
(&self)
src/instruments/options.rs:282
↓ 4 callers
Method
insert
Adds a creation method to the registry
src/core/factories.rs:35
↓ 4 callers
Method
insert
Adds a fixings curve
src/data/fixings.rs:56
↓ 4 callers
Function
instrument_from_json
An instrument in QuantMath represents any tradable item. At simplest, it can be a currency, zero coupon bond, equity or commodity. At most complex, it
src/facade/mod.rs:34
↓ 4 callers
Function
log_discount_with_borrow
Precalculate the fixed offset to be passed into discount_with_borrow. Actually returns rt - qt where t is the time from the base date of the discount
src/data/forward.rs:177
↓ 4 callers
Function
manual_step
( calendar: &Calendar, from: Date, direction: i32, steps: i32)
src/dates/calendar.rs:878
↓ 4 callers
Method
modify
Decorate or modify a vol surface to cope with a change from the base date when the surface was calibrated to the spot date now.
src/data/volsurface.rs:312
↓ 4 callers
Function
new_test_volatility_calendar
()
src/dates/calendar.rs:938
↓ 4 callers
Method
payoff_currency
(&self)
src/instruments/options.rs:292
↓ 4 callers
Method
results
(&self)
src/risk/deltagamma.rs:46
↓ 4 callers
Method
results
(&self)
src/risk/vegavolga.rs:54
↓ 4 callers
Function
sample_currency_json
()
src/facade/mod.rs:254
↓ 4 callers
Function
sample_pricing_context
(spot: f64)
src/instruments/assets.rs:478
↓ 4 callers
Method
serialize_with_dedup
(&self, serializer: S, tls_seed: &'static LocalKey<RefCell<Dedup<T, R>>>, serialize: F)
src/core/dedup.rs:132
↓ 4 callers
Method
spot_date
(&self)
src/data/bumptime.rs:14
↓ 4 callers
Method
vol_surface
Gets a Vol Surface, given any instrument, for example an equity. Also specify a high water mark, beyond which we never directly ask for vols.
src/risk/cache.rs:196
↓ 4 callers
Method
volatilities
(&self, date_time: DateDayFraction, strikes: &[f64], volatilities: &mut[f64])
src/data/volsurface.rs:418
↓ 4 callers
Method
volatilities
The volatilities remain constant. All that changes is the vol time that we return from the decorator. (Vol times internally must remain unchanged, oth
src/data/voldecorators.rs:51
↓ 3 callers
Method
as_any
(&self)
src/risk/vegavolga.rs:42
↓ 3 callers
Method
as_bumpable
(&self)
src/pricers/montecarlo.rs:119
↓ 3 callers
Function
as_instrument
Takes a handle as returned by from_instrument and converts it back to a reference-counted pointer to an instrument. The handle is not freed as part of
src/facade/handle.rs:230
↓ 3 callers
Function
assert_approx
(value: f64, expected: f64, tolerance: f64)
src/solvers/impliedvol.rs:86
↓ 3 callers
Function
assert_json_equal
A helper function to assert that two strings contain the same JSON data.
src/core/factories.rs:665
↓ 3 callers
Function
basket_tagged_serde_dedup
(control: DedupControl, currencies: HashMap<String, RcCurrency>, instruments: HashMap<String
src/instruments/options.rs:1892
↓ 3 callers
Method
calendar
(&self)
src/data/volsurface.rs:433
↓ 3 callers
Method
cmp
(&self, other: &Currency)
src/instruments/assets.rs:92
↓ 3 callers
Method
context
(&self)
src/risk/cache.rs:297
↓ 3 callers
Method
count_holidays
Count holidays, not including weekends. This method excludes any holidays on the end dates of the range.
src/dates/calendar.rs:338
↓ 3 callers
Function
create_sample_divstream
()
src/data/divstream.rs:473
↓ 3 callers
Method
credit_id
(&self)
src/instruments/basket.rs:65
↓ 3 callers
Method
delta
(&self)
src/risk/deltagamma.rs:93
↓ 3 callers
Function
dependence_on_spot_discount
(instrument: &Instrument, context: &mut DependencyContext)
src/instruments/assets.rs:135
↓ 3 callers
Method
deref
(&self)
src/risk/marketdata.rs:151
↓ 3 callers
Function
discount_with_borrow
Within a forward, all discounting and growth is done using exp(-rt + qt), i.e. using both the discount curve and the borrow curve. This is because the
src/data/forward.rs:167
↓ 3 callers
Function
european_tagged_serde_dedup
(control: DedupControl, map: HashMap<String, RcCurrency>, expected: &str)
src/instruments/options.rs:1362
↓ 3 callers
Function
fixing_table_from_json
A FixingTable contains historical fixings for one or more assets, defined by Date and time of day.
src/facade/mod.rs:86
↓ 3 callers
Method
forward
(&self)
src/data/volsurface.rs:437
↓ 3 callers
Method
generate
(&self, pricer: &mut Pricer, saveable: &mut Saveable, unbumped: f64)
src/risk/deltagamma.rs:138
↓ 3 callers
Method
generate
(&self, pricer: &mut Pricer, saveable: &mut Saveable, unbumped: f64)
src/risk/vegavolga.rs:146
↓ 3 callers
Method
get_optional
Tries to get a fixing for the given instrument and date. Returns None if the fixing is not found.
src/data/fixings.rs:80
↓ 3 callers
Method
get_type_id
(&self)
src/core/factories.rs:92
↓ 3 callers
Function
linear_interpolate
Linear interpolation function. The y value and result must be f64. The x value can be any type supporting subtraction giving a numeric type.
src/math/interpolation.rs:110
↓ 3 callers
Function
market_data_from_json
MarketData contains all the live market data required for pricing. This is spots, yield and borrow curves, dividends, volatilities, and correlations.
src/facade/mod.rs:99
↓ 3 callers
Function
nr_splint
Code adapted from Numerical Recipes in C. This is a large change, because the original also did the binary chop to find the interpolation point. Thus
src/math/interpolation.rs:418
↓ 3 callers
Method
observation
(&mut self, instrument: &RcInstrument, date_time: DateDayFraction)
src/models/mod.rs:139
↓ 3 callers
Function
pricer_factory_from_json
A PricerFactory is used to create pricers, given an instrument to price and a fixing table. It contains enough information to define how the pricing i
src/facade/mod.rs:75
↓ 3 callers
Method
remaining_holidays
Finds the next holiday, including the day we start from, and returns its offset in the vector. Also returns a bool to say whether the next holiday was
src/dates/calendar.rs:313
↓ 3 callers
Function
report_generator_from_json
A ReportGenerator takes a pricer and bumps and revalues it to generate a report of sensitivities to market data changes.
src/facade/mod.rs:110
↓ 3 callers
Function
sample_forward_european
()
src/risk/marketdata.rs:451
↓ 3 callers
Function
sample_settlement
(step: u32)
src/risk/marketdata.rs:426
↓ 3 callers
Function
serde_tagged_dedup_roundtrip
(control: DedupControl, map: HashMap<String, DrcStored>, expected: &str)
src/core/factories.rs:609
↓ 3 callers
Method
settlement
(&self)
src/instruments/basket.rs:66
↓ 3 callers
Method
slip_to_next
slide off a holiday or weekend onto the nearest business day, stepping either forward or backward. (Step is +/- 1.)
src/dates/calendar.rs:324
↓ 3 callers
Function
slip_to_next_weekday
private helper function to step forward or backward to the nearest Monday to Friday
src/dates/calendar.rs:274
↓ 3 callers
Method
spot
(&mut self, instrument: &RcInstrument)
src/risk/dependencies.rs:129
↓ 3 callers
Function
test_dedup
(control: DedupControl, map: HashMap<String, DrcNode>, expected: &str)
src/core/dedup.rs:457
↓ 3 callers
Method
time_to_day_fraction
(&self, date_time: DateTime)
src/instruments/basket.rs:80
↓ 3 callers
Function
to_strikes
(normalised: &[f64], forward: f64, sqrt_variance: f64)
src/data/volsurface.rs:889
↓ 3 callers
Function
validate_abscissae
You should invoke this method to validate that the curve contains suitable data for this interpolator. Otherwise you may get unexpected panics or inco
src/math/interpolation.rs:166
← previous
next →
101–200 of 887, ranked by callers