Skip to content

Commit

Permalink
fix: heston nmle
Browse files Browse the repository at this point in the history
  • Loading branch information
dancixx committed Sep 28, 2024
1 parent 5dc1d32 commit 92b22a7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion stochastic-rs-quant/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ yahoo_finance_api = "2.2.1"
mimalloc = ["dep:mimalloc"]
jemalloc = ["dep:tikv-jemallocator"]
yahoo = []
default = []
default = ["yahoo"]

[lib]
name = "stochastic_rs_quant"
Expand Down
2 changes: 1 addition & 1 deletion stochastic-rs-quant/src/yahoo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl<'a> Default for Yahoo<'a> {
impl<'a> Yahoo<'a> {
/// Set symbol
pub fn set_symbol(&mut self, symbol: &'a str) {
self.symbol = Some(Cow::Borrowed(&symbol));
self.symbol = Some(Cow::Borrowed(symbol));
}

/// Set start date
Expand Down
4 changes: 1 addition & 3 deletions stochastic-rs-stats/src/fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ impl FractalDim {
let v1 = vp(sum1, 1, self.x.len());
let v2 = vp(sum2, 2, self.x.len());

let d_vp = 2.0 - (1.0 / p) * ((v2.ln() - v1.ln()) / LN_2);

d_vp
2.0 - (1.0 / p) * ((v2.ln() - v1.ln()) / LN_2)
}

pub fn higuchi_fd(&self, kmax: usize) -> f64 {
Expand Down

0 comments on commit 92b22a7

Please sign in to comment.