Skip to content

Commit

Permalink
Cast percentages
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorLop committed Oct 19, 2023
1 parent 2993d45 commit fc8a95b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/distributions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub fn get_distributions() -> HashMap<&'static str, Vec<f64>> {
let rate: f64 = record[1]
.parse()
.expect("Failure parsing a return interest into a f64");
sp500_dist.push(rate);
sp500_dist.push(rate / 100.0);
}

if let Some(old_value) = distributions.insert("sp500", sp500_dist) {
Expand All @@ -29,7 +29,7 @@ pub fn get_distributions() -> HashMap<&'static str, Vec<f64>> {
let rate: f64 = record[1]
.parse()
.expect("Failure parsing a return interest into a f64");
msci_world_dist.push(rate);
msci_world_dist.push(rate / 100.0);
}

if let Some(old_value) = distributions.insert("msci_world", msci_world_dist) {
Expand Down

0 comments on commit fc8a95b

Please sign in to comment.