equal
deleted
inserted
replaced
93 val new_balance = yearly_yield(data, balance, year) |
93 val new_balance = yearly_yield(data, balance, year) |
94 compound_yield(data, new_balance, year + 1) |
94 compound_yield(data, new_balance, year + 1) |
95 } |
95 } |
96 } |
96 } |
97 |
97 |
98 yearly_yield(d, 100, 0) |
98 //yearly_yield(d, 100, 0) |
99 //compound_yield(d.take(6), 100, 0) |
99 //compound_yield(d.take(6), 100, 0) |
100 |
100 |
101 def investment(portfolio: List[String], years: Range, start_balance: Long): Long = { |
101 def investment(portfolio: List[String], years: Range, start_balance: Long): Long = { |
102 compound_yield(get_deltas(get_prices(portfolio, years)), start_balance, 0) |
102 compound_yield(get_deltas(get_prices(portfolio, years)), start_balance, 0) |
103 } |
103 } |