public interface ReturnsCalculator
Implementations determine whether a return is an absolute change,
a fractional simple return, or a logarithmic return. Use the same
implementation for calculating a return and reconstructing a price;
computePrice cannot infer a return's convention.
ReturnsCalculators| Modifier and Type | Method and Description |
|---|---|
double |
computePrice(double px0,
double r)
Computes the next price after a return.
|
double |
computeReturn(double p0,
double p1)
Computes the portfolio return.
|
double computeReturn(double p0,
double p1)
p0 - the beginning value of the portfoliop1 - the ending value of the portfoliodouble computePrice(double px0,
double r)
px0 - the original pricer - the returnCopyright © 2010-2026 NM Group. All Rights Reserved.