|
|
@@ -76,7 +76,7 @@ fn calc_volatility_div_price_diff(records: Value) -> Decimal {
|
|
|
let volume = Decimal::from_str(record["volume"].as_str().unwrap().to_string().as_str()).unwrap();
|
|
|
let mid = (record_high + record_low) / Decimal::TWO;
|
|
|
|
|
|
- volatility += (volume * mid).ln() * Decimal::ONE_HUNDRED * (record_high - record_low) / mid;
|
|
|
+ volatility += ((volume * mid).ln() * Decimal::ONE_HUNDRED * (record_high - record_low) / mid).ln();
|
|
|
}
|
|
|
|
|
|
let mut vdpd = volatility;
|