Skip to content

Commit

Permalink
Merge branch 'master' into pv2
Browse files Browse the repository at this point in the history
  • Loading branch information
alecloudenback authored Nov 3, 2023
2 parents 5d20633 + 90187c1 commit e675765
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Projection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,10 @@ function __rewrap(from, to)
return to
end


function FinanceCore.present_value(model, p::FinanceModels.Projection{C,M,K}, cur_time=0.0) where
{
C,M,K<:FinanceModels.CashflowProjection
}
xf = p |> Filter(cf -> cf.time >= cur_time) |> Map(cf -> FinanceCore.discount(model, cur_time, cf.time) * cf.amount)
foldxl(+, xf)
end
end

0 comments on commit e675765

Please sign in to comment.