pub struct MertonJump {
pub risk_free_rate: f64,
pub mu: f64,
pub sigma: f64,
pub jump_rate: f64,
pub jump_multiplier: f64,
}Expand description
Merton log-utility portfolio with a deterministic multiplicative jump.
See the module-level documentation for the formulation and exact solution.
Fields§
§risk_free_rate: f64Risk-free rate.
mu: f64Risky-asset drift.
sigma: f64Risky-asset volatility.
jump_rate: f64Poisson jump intensity.
jump_multiplier: f64Deterministic multiplicative jump (wealth scales by 1 + u (y - 1)).
Implementations§
Source§impl MertonJump
impl MertonJump
Sourcepub fn new(
risk_free_rate: f64,
mu: f64,
sigma: f64,
jump_rate: f64,
jump_multiplier: f64,
) -> Self
pub fn new( risk_free_rate: f64, mu: f64, sigma: f64, jump_rate: f64, jump_multiplier: f64, ) -> Self
Sourcepub fn exact_policy(&self) -> f64
pub fn exact_policy(&self) -> f64
Optimal (constant) portfolio fraction, the admissible root of the policy quadratic.
§Examples
use solver::models::merton_jump::MertonJump;
let m = MertonJump::new(0.03, 0.08, 0.3, 1.0, 1.1);
assert!(m.exact_policy() > 0.0);Trait Implementations§
Source§impl Clone for MertonJump
impl Clone for MertonJump
Source§fn clone(&self) -> MertonJump
fn clone(&self) -> MertonJump
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MertonJump
Source§impl Debug for MertonJump
impl Debug for MertonJump
Source§impl From<&MertonJump> for Merton
The no-jump reduction of MertonJump with jump_rate = 0.
impl From<&MertonJump> for Merton
The no-jump reduction of MertonJump with jump_rate = 0.
Source§fn from(model: &MertonJump) -> Self
fn from(model: &MertonJump) -> Self
Converts to this type from the input type.
Source§impl From<&MertonJumpLogNormal> for MertonJump
The zero-volatility reduction of MertonJumpLogNormal to the
deterministic-jump MertonJump with multiplier y = e^m.
impl From<&MertonJumpLogNormal> for MertonJump
The zero-volatility reduction of MertonJumpLogNormal to the
deterministic-jump MertonJump with multiplier y = e^m.
Source§fn from(model: &MertonJumpLogNormal) -> Self
fn from(model: &MertonJumpLogNormal) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MertonJump
impl RefUnwindSafe for MertonJump
impl Send for MertonJump
impl Sync for MertonJump
impl Unpin for MertonJump
impl UnsafeUnpin for MertonJump
impl UnwindSafe for MertonJump
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more