this
stochastic process.
24 | *
25 | * @param time The time at which the stochastic process is observed.
26 | * @return The characteristic function of X(t).
27 | */
28 | CharacteristicFunction apply(double time);
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/fouriermethod/models/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides characteristic functions of stochastic processes (models).
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.fouriermethod.models;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/fouriermethod/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides algorithms related to derivative valuation via
3 | * a models characteristic functions and Fourier transforms of a products payoffs.
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.fouriermethod;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/fouriermethod/products/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides characteristic functions of payoffs / values (products) and their numerical integration against a given model (valuation).
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.fouriermethod.products;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/fouriermethod/products/smile/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Products which are provide a "smile function" \( K \mapsto V(K) \) mapping a product strike to
3 | * the corresponding product value.
4 | *
5 | * @author Alessandro Gnoatto
6 | * @author Christian Fries
7 | */
8 | package net.finmath.fouriermethod.products.smile;
9 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/functions/DoubleTernaryOperator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Created on 07.02.2014.
3 | *
4 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
5 | */
6 | package net.finmath.functions;
7 |
8 | /**
9 | * Functional interface for functions mapping (double,double,double) to double.
10 | *
11 | * @author Christian Fries
12 | * @see java.util.function.DoubleUnaryOperator
13 | * @version 1.0
14 | */
15 | @FunctionalInterface
16 | public interface DoubleTernaryOperator {
17 | /**
18 | * Applies this operator to the given operands.
19 | *
20 | * @param x the first operand
21 | * @param y the second operand
22 | * @param z the third operand
23 | * @return the operator result
24 | */
25 | double applyAsDouble(double x, double y, double z);
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/functions/GammaDistribution.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 29.06.2014
5 | */
6 |
7 | package net.finmath.functions;
8 |
9 | /**
10 | * @author Christian Fries
11 | * @version 1.0
12 | */
13 | public class GammaDistribution {
14 |
15 | private final org.apache.commons.math3.distribution.GammaDistribution gammaDistribution;
16 |
17 | public GammaDistribution(final double shape, final double scale) {
18 | super();
19 | gammaDistribution = new org.apache.commons.math3.distribution.GammaDistribution(shape, scale);
20 | }
21 |
22 | /**
23 | * Return the inverse cumulative distribution function at x.
24 | *
25 | * @param x Argument
26 | * @return Inverse cumulative distribution function at x.
27 | */
28 | public double inverseCumulativeDistribution(final double x) {
29 | return gammaDistribution.inverseCumulativeProbability(x);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/functions/PoissonDistribution.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 29.06.2014
5 | */
6 |
7 | package net.finmath.functions;
8 |
9 | /**
10 | * @author Christian Fries
11 | * @version 1.0
12 | */
13 | public class PoissonDistribution {
14 | private final double lambda;
15 |
16 | public PoissonDistribution(final double lambda) {
17 | super();
18 | this.lambda = lambda;
19 | }
20 |
21 | /**
22 | * Return the inverse cumulative distribution function at x.
23 | *
24 | * @param x Argument
25 | * @return Inverse cumulative distribution function at x.
26 | */
27 | public double inverseCumulativeDistribution(final double x) {
28 | double p = Math.exp(-lambda);
29 | double dp = p;
30 | int k = 0;
31 | while(x > p) {
32 | k++;
33 | dp *= lambda / k;
34 | p += dp;
35 | }
36 | return k;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/functions/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides some static functions, e.g., analytic valuation formulas or functions from linear algebra.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.functions;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/information/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides information about the library (e.g. the version and build number) and runtime.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.information;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/integration/RealIntegral.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 23.03.2014
5 | */
6 |
7 | package net.finmath.integration;
8 |
9 | import java.util.function.DoubleUnaryOperator;
10 |
11 | /**
12 | * Interface for real integral. An integral is a map which
13 | * maps a DoubleUnaryOperator to a double.
14 | *
15 | * This is a functional interface.
16 | *
17 | * @author Christian Fries
18 | * @version 1.0
19 | */
20 | @FunctionalInterface
21 | public interface RealIntegral {
22 |
23 | double integrate(DoubleUnaryOperator integrand);
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/integration/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides algorithms for numerical integration and wrappers to libraries with algorithms for numerical integration.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.integration;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/interpolation/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Basic methodologies to interpolate of curves and surfaces are provided here.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.interpolation;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/calibration/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides classes to create a calibrated model of curves from a collection of calibration
3 | * products and corresponding target values.
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.marketdata.calibration;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/model/bond/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides classes related to the modeling of Bond curves.
3 | * See Beier/Fries (2017).
4 | *
5 | * @author Christian Fries
6 | * @author Moritz Scherrmann
7 | */
8 | package net.finmath.marketdata.model.bond;
9 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/model/cds/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides classes related to the valuations of CDS.
3 | *
4 | * @author Christian Fries
5 | * @author Matthias Föhr
6 | */
7 | package net.finmath.marketdata.model.cds;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/model/curves/locallinearregression/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provided classes implementing the local linear regression method, see see https://ssrn.com/abstract=3073942
3 | *
4 | * @author Christian Fries
5 | * @author Moritz Scherrmann
6 | */
7 | package net.finmath.marketdata.model.curves.locallinearregression;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/model/curves/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interface specification and implementation of curves, e.g., interest rate
3 | * curves like discount curves and forward curves.
4 | *
5 | * Curves are mappings t → f(t), usually given by a discrete set of points and an interpolation
6 | * and extrapolation methods.
7 | *
8 | * @author Christian Fries
9 | */
10 | package net.finmath.marketdata.model.curves;
11 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/model/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interface specification and implementation of a model, which is essentially
3 | * a collection of curves. A model exposes the parameters of its elements (curves)
4 | * as a single parameter an can be calibrated using a generic solver.
5 | *
6 | * @author Christian Fries
7 | */
8 | package net.finmath.marketdata.model;
9 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/model/volatilities/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interface specification and implementation of volatility surfaces, e.g.,
3 | * interest rate volatility surfaces like (implied) caplet volatilities and swaption
4 | * volatilities.
5 | * Volatility surfaces are mappings (t,K) → f(t,K), usually given by a discrete
6 | * set of points and an interpolation and extrapolation method or a functional form
7 | * (like the SABR model).
8 | *
9 | *
10 | * @author Christian Fries
11 | */
12 | package net.finmath.marketdata.model.volatilities;
13 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/model/volatility/caplet/CapTenorStructure.java:
--------------------------------------------------------------------------------
1 | package net.finmath.marketdata.model.volatility.caplet;
2 |
3 | /**
4 | * Enum determining the currency of the observed cap or caplet prices.
5 | */
6 | public enum CapTenorStructure {
7 | EUR,
8 | USD
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/model/volatility/caplet/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Algorithms related to bootstrapping and interpolation of caplet implied volatilities.
3 | *
4 | * @TODO The code in this package is still under development and needs some polishing.
5 | */
6 | package net.finmath.marketdata.model.volatility.caplet;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/model/volatility/caplet/smile/SmileInterpolationExtrapolationMethod.java:
--------------------------------------------------------------------------------
1 | package net.finmath.marketdata.model.volatility.caplet.smile;
2 |
3 | /**
4 | * Interface for a Smile inter and extrapolation.
5 | */
6 | public interface SmileInterpolationExtrapolationMethod {
7 |
8 | double calculateInterpolatedExtrapolatedSmileVolatility(double strike, int rowIndex);
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/model/volatility/caplet/smile/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Algorithms related to caplet smile interpolation.
3 | */
4 | package net.finmath.marketdata.model.volatility.caplet.smile;
5 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/model/volatility/caplet/tenorconversion/CorrelationProvider.java:
--------------------------------------------------------------------------------
1 | package net.finmath.marketdata.model.volatility.caplet.tenorconversion;
2 |
3 | import net.finmath.exception.CalculationException;
4 | import net.finmath.marketdata.model.AnalyticModel;
5 |
6 | /**
7 | * Interface for a correlation provider for forward curves.
8 | */
9 | public interface CorrelationProvider {
10 | double getCorrelation(int newTenor, double firstForwardFixingTimeVectorInYears, double secondForwardFixingTimeVectorInYears, AnalyticModel analyticModel, String indexForDiscount) throws CalculationException;
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/model/volatility/caplet/tenorconversion/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Algorithms related to caplet tenor conversion.
3 | */
4 | package net.finmath.marketdata.model.volatility.caplet.tenorconversion;
5 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Algorithms and methodologies related to market data, e.g., calibration of interest rate curves, interpolation of volatility surfaces.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.marketdata;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/products/AbstractAnalyticProduct.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 12.10.2013
5 | */
6 |
7 | package net.finmath.marketdata.products;
8 |
9 | import net.finmath.marketdata.model.AnalyticModel;
10 | import net.finmath.modelling.Model;
11 |
12 | /**
13 | * @author Christian Fries
14 | * @version 1.0
15 | */
16 | public abstract class AbstractAnalyticProduct implements AnalyticProduct {
17 |
18 | /* (non-Javadoc)
19 | * @see net.finmath.marketdata.products.ProductInterface#getValue(double, net.finmath.marketdata.products.ModelInterface)
20 | */
21 | @Override
22 | public Object getValue(final double evaluationTime, final Model model) {
23 | throw new IllegalArgumentException("The product " + this.getClass()
24 | + " cannot be valued against a model " + model.getClass() + "."
25 | + "It requires a model of type " + AnalyticModel.class + ".");
26 | }
27 |
28 | public double getValue(final AnalyticModel model) {
29 | return getValue(0.0, model);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/products/AnalyticProduct.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 26.11.2012
5 | */
6 | package net.finmath.marketdata.products;
7 |
8 | import net.finmath.marketdata.model.AnalyticModel;
9 | import net.finmath.modelling.Product;
10 |
11 | /**
12 | * The interface which has to be implemented by a product which may
13 | * be evaluated using an AnalyticModelFromCurvesAndVols
.
14 | *
15 | * @author Christian Fries
16 | * @version 1.0
17 | */
18 | public interface AnalyticProduct extends Product {
19 |
20 | /**
21 | * Return the valuation of the product using the given model.
22 | * The model has to implement the modes of AnalyticModel
.
23 | *
24 | * @param evaluationTime The evaluation time as double. Cash flows prior and including this time are not considered.
25 | * @param model The model under which the product is valued.
26 | * @return The value of the product using the given model.
27 | */
28 | double getValue(double evaluationTime, AnalyticModel model);
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata/products/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interface specification and implementation of products, e.g., calibration products.
3 | * Products can be valued using the model (which provides valuation curves).
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.marketdata.products;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata2/calibration/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides classes to create a calibrated model of curves from a collection of calibration
3 | * products and corresponding target values.
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.marketdata2.calibration;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata2/interpolation/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Basic methodologies to interpolate of curves and surfaces are provided here.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.marketdata2.interpolation;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata2/model/curves/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interface specification and implementation of curves, e.g., interest rate
3 | * curves like discount curves and forward curves.
4 | *
5 | * Curves are mappings t → f(t), usually given by a discrete set of points and an interpolation
6 | * and extrapolation methods.
7 | *
8 | * @author Christian Fries
9 | */
10 | package net.finmath.marketdata2.model.curves;
11 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata2/model/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interface specification and implementation of a model, which is essentially
3 | * a collection of curves. A model exposes the parameters of its elements (curves)
4 | * as a single parameter an can be calibrated using a generic solver.
5 | *
6 | * @author Christian Fries
7 | */
8 | package net.finmath.marketdata2.model;
9 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata2/model/volatilities/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interface specification and implementation of volatility surfaces, e.g.,
3 | * interest rate volatility surfaces like (implied) caplet volatilities and swaption
4 | * volatilities.
5 | * Volatility surfaces are mappings (t,K) → f(t,K), usually given by a discrete
6 | * set of points and an interpolation and extrapolation method or a functional form
7 | * (like the SABR model).
8 | *
9 | *
10 | * @author Christian Fries
11 | */
12 | package net.finmath.marketdata2.model.volatilities;
13 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata2/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Algorithms and methodologies related to market data, e.g., calibration of interest rate curves, interpolation of volatility surfaces.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.marketdata2;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata2/products/AbstractAnalyticProduct.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 12.10.2013
5 | */
6 |
7 | package net.finmath.marketdata2.products;
8 |
9 | import net.finmath.marketdata2.model.AnalyticModel;
10 | import net.finmath.modelling.Model;
11 | import net.finmath.stochastic.RandomVariable;
12 |
13 | /**
14 | * @author Christian Fries
15 | *
16 | * @version 1.0
17 | */
18 | public abstract class AbstractAnalyticProduct implements AnalyticProduct {
19 |
20 | /* (non-Javadoc)
21 | * @see net.finmath.marketdata.products.ProductInterface#getValue(double, net.finmath.marketdata.products.ModelInterface)
22 | */
23 | @Override
24 | public Object getValue(final double evaluationTime, final Model model) {
25 | throw new IllegalArgumentException("The product " + this.getClass()
26 | + " cannot be valued against a model " + model.getClass() + "."
27 | + "It requires a model of type " + AnalyticModel.class + ".");
28 | }
29 |
30 | public RandomVariable getValue(final AnalyticModel model) {
31 | return getValue(0.0, model);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/marketdata2/products/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interface specification and implementation of products, e.g., calibration products.
3 | * Products can be valued using the model (which provides valuation curves).
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.marketdata2.products;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/modelling/DescribedModel.java:
--------------------------------------------------------------------------------
1 | package net.finmath.modelling;
2 |
3 | /**
4 | * Interface for models which can provide a complete description of their model parameters (independent of the implementation of the numerical method).
5 | *
6 | * @author Christian Fries
7 | *
8 | * @param ModelDescriptor
interface, being rich enough to describe the model implementing this interface.
9 | * @version 1.0
10 | */
11 | public interface DescribedModelProductDescriptor
interface, being rich enough to describe the product implementing this interface.
9 | * @version 1.0
10 | */
11 | public interface DescribedProductProduct
.
12 | * For a description of the general concept see http://finmath.net/finmath-lib/concepts/separationofproductandmodel.
13 | *
14 | * @author Christian Fries
15 | * @version 1.0
16 | */
17 | public interface Model {
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/modelling/ModelDescriptor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 09.02.2018
5 | */
6 |
7 | package net.finmath.modelling;
8 |
9 | /**
10 | * Interface for a model descriptor.
11 | * For a description of the general concept see http://finmath.net/finmath-lib/concepts/separationofproductandmodel.
12 | *
13 | * @author Christian Fries
14 | * @version 1.0
15 | */
16 | public interface ModelDescriptor {
17 |
18 | /**
19 | * Return the version of the model description.
20 | *
21 | * @return Version number.
22 | */
23 | Integer version();
24 |
25 | /**
26 | * Return the name of the model represented by this descriptor.
27 | *
28 | * @return Name of the model.
29 | */
30 | String name();
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/modelling/ModelFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 09.02.2018
5 | */
6 |
7 | package net.finmath.modelling;
8 |
9 | /**
10 | * A factory to instantiate a model from a given descriptor.
11 | *
12 | * Factories are specific to a numerical method.
13 | *
14 | * @author Christian Fries
15 | * @author Luca Del Re
16 | *
17 | * @param The base class of the product descriptors which can be handled by this ProductFactory
.
15 | * @version 1.0
16 | */
17 | public interface ProductFactory
{
18 |
19 | /**
20 | * Constructs the product from a given product descriptor.
21 | *
22 | * @param descriptor A product descriptor.
23 | * @return An instance of the product describable by this descriptor.
24 | */
25 | DescribedProduct extends P> getProductFromDescriptor(ProductDescriptor descriptor);
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/modelling/SingleAssetProductDescriptor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 09.02.2018
5 | */
6 |
7 | package net.finmath.modelling;
8 |
9 | /**
10 | * Interface for a product descriptor.
11 | * For a description of the general concept see http://finmath.net/finmath-lib/concepts/separationofproductandmodel.
12 | *
13 | * @author Christian Fries
14 | * @version 1.0
15 | */
16 | public interface SingleAssetProductDescriptor extends ProductDescriptor {
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/modelling/descriptor/AssetModelDescriptor.java:
--------------------------------------------------------------------------------
1 | package net.finmath.modelling.descriptor;
2 |
3 | import net.finmath.modelling.ModelDescriptor;
4 |
5 | /**
6 | * Marker interface for descriptors describing an asset model.
7 | *
8 | * @author Christian Fries
9 | * @author Roland Bachl
10 | * @version 1.0
11 | */
12 | public interface AssetModelDescriptor extends ModelDescriptor {
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/modelling/descriptor/InterestRateModelDescriptor.java:
--------------------------------------------------------------------------------
1 | package net.finmath.modelling.descriptor;
2 |
3 | import net.finmath.modelling.ModelDescriptor;
4 |
5 | /**
6 | * Marker interface for descriptors describing an interest rate model.
7 | *
8 | * @author Christian Fries
9 | * @author Roland Bachl
10 | * @version 1.0
11 | */
12 | public interface InterestRateModelDescriptor extends ModelDescriptor {
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/modelling/descriptor/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interface separating implementation from specification (of models and products)
3 | *
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.modelling.descriptor;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/modelling/descriptor/xmlparser/XMLParser.java:
--------------------------------------------------------------------------------
1 | package net.finmath.modelling.descriptor.xmlparser;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 |
6 | import javax.xml.parsers.ParserConfigurationException;
7 |
8 | import org.xml.sax.SAXException;
9 |
10 | import net.finmath.modelling.ProductDescriptor;
11 |
12 | /**
13 | * Interface for XML parsers creating a product descriptor from an XML file.
14 | *
15 | * @author Christian Fries
16 | * @author Roland Bachl
17 | */
18 | public interface XMLParser {
19 |
20 | /**
21 | * Parse a product descriptor from a file.
22 | *
23 | * @param file File containing a trade.
24 | * @return Product descriptor extracted from the file.
25 | * @throws SAXException Thrown by the xml parser.
26 | * @throws IOException Thrown if the file in not found or another IO error occured.
27 | * @throws ParserConfigurationException Thrown by the xml parser.
28 | */
29 | ProductDescriptor getProductDescriptor(File file) throws SAXException, IOException, ParserConfigurationException;
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/modelling/descriptor/xmlparser/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides xml parsers to construct descriptors from XML
3 | *
4 | * @author Christian Fries
5 | * @author Roland Bachl
6 | */
7 | package net.finmath.modelling.descriptor.xmlparser;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/modelling/modelfactory/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides classes to build models from descriptors.
3 | *
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.modelling.modelfactory;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/modelling/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interface separating models and products.
3 | *
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.modelling;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/modelling/productfactory/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides classes to build products from descriptors.
3 | *
4 | *
5 | * @author Christian Fries
6 | * @author Roland Bachl
7 | */
8 | package net.finmath.modelling.productfactory;
9 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/modelling/products/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Interface and base classes related to products.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.modelling.products;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/RandomVariableFloatFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christianfries.com.
3 | *
4 | * Created on 21.06.2017
5 | */
6 |
7 | package net.finmath.montecarlo;
8 |
9 | import net.finmath.stochastic.RandomVariable;
10 |
11 | /**
12 | * @author Christian Fries
13 | *
14 | */
15 | public class RandomVariableFloatFactory extends AbstractRandomVariableFactory {
16 |
17 | private static final long serialVersionUID = 3368581641610610123L;
18 |
19 | public RandomVariableFloatFactory() {
20 | super();
21 | }
22 |
23 | @Override
24 | public RandomVariable createRandomVariable(final double time, final double value) {
25 | return new RandomVariableFromFloatArray(time, value);
26 | }
27 |
28 | @Override
29 | public RandomVariable createRandomVariable(final double time, final double[] values) {
30 | return new RandomVariableFromFloatArray(time, values);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/RandomVariableLazyEvaluationFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 09.02.2004
5 | */
6 | package net.finmath.montecarlo;
7 |
8 | import net.finmath.stochastic.RandomVariable;
9 |
10 | /**
11 | *
12 | * @author Christian Fries
13 | * @version 1.0
14 | */
15 | public class RandomVariableLazyEvaluationFactory extends AbstractRandomVariableFactory {
16 |
17 | /**
18 | *
19 | */
20 | private static final long serialVersionUID = 5474699190536441150L;
21 |
22 | @Override
23 | public RandomVariable createRandomVariable(final double time, final double value) {
24 | return new RandomVariableLazyEvaluation(time, value);
25 | }
26 |
27 | @Override
28 | public RandomVariable createRandomVariable(final double time, final double[] values) {
29 | return new RandomVariableLazyEvaluation(time, values);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/assetderivativevaluation/MonteCarloBlackScholesModelClassDiagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/finmath/finmath-lib/b7a1cb5ef752057feca7c048cc700a8f52e9676c/src/main/java/net/finmath/montecarlo/assetderivativevaluation/MonteCarloBlackScholesModelClassDiagram.png
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/assetderivativevaluation/models/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Equity models implementing {@link net.finmath.montecarlo.model.ProcessModel}
3 | * e.g. by extending {@link net.finmath.montecarlo.model.AbstractProcessModel}.
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.montecarlo.assetderivativevaluation.models;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/assetderivativevaluation/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Monte-Carlo models for asset value processes, like the Black Scholes model.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.montecarlo.assetderivativevaluation;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/AssetMonteCarloProduct.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 17.02.2013
5 | */
6 | package net.finmath.montecarlo.assetderivativevaluation.products;
7 |
8 | import net.finmath.exception.CalculationException;
9 | import net.finmath.montecarlo.assetderivativevaluation.AssetModelMonteCarloSimulationModel;
10 | import net.finmath.stochastic.RandomVariable;
11 |
12 | /**
13 | * Interface for products requiring an AssetModelMonteCarloSimulationModel for valuation.
14 | *
15 | * @author Christian Fries
16 | * @version 1.0
17 | */
18 | public interface AssetMonteCarloProduct {
19 |
20 | RandomVariable getValue(double evaluationTime, AssetModelMonteCarloSimulationModel model) throws CalculationException;
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/assetderivativevaluation/products/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Products which may be valued using an AssetModelMonteCarloSimulationModel
.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.montecarlo.assetderivativevaluation.products;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/automaticdifferentiation/IndependentModelParameterProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christianfries.com.
3 | *
4 | * Created on 02.07.2017
5 | */
6 |
7 | package net.finmath.montecarlo.automaticdifferentiation;
8 |
9 | import java.util.Map;
10 |
11 | import net.finmath.stochastic.RandomVariable;
12 |
13 | /**
14 | * Interface implemented by model which can provide their independent model parameters.
15 | *
16 | * This is useful for the model independent calculation of derivatives using AAD.
17 | *
18 | * @author Christian Fries
19 | */
20 | public interface IndependentModelParameterProvider {
21 |
22 | /**
23 | * Returns a map of independent model parameters of this model.
24 | *
25 | * @return Map of independent model parameters of this model.
26 | */
27 | default Mapnet.finmath.montecarlo.process
.
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.montecarlo.crosscurrency;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/hybridassetinterestrate/HybridAssetLIBORModelMonteCarloSimulation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 03.04.2015
5 | */
6 | package net.finmath.montecarlo.hybridassetinterestrate;
7 |
8 | import net.finmath.montecarlo.MonteCarloSimulationModel;
9 | import net.finmath.montecarlo.assetderivativevaluation.AssetModelMonteCarloSimulationModel;
10 | import net.finmath.montecarlo.interestrate.LIBORModelMonteCarloSimulationModel;
11 |
12 | /**
13 | * Basic interface which has to be implemented by Monte Carlo models for hybrid processes.
14 | *
15 | * @author Christian Fries
16 | * @version 1.0
17 | */
18 | public interface HybridAssetLIBORModelMonteCarloSimulation extends MonteCarloSimulationModel, LIBORModelMonteCarloSimulationModel, AssetModelMonteCarloSimulationModel {
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/hybridassetinterestrate/RiskFactorFX.java:
--------------------------------------------------------------------------------
1 | package net.finmath.montecarlo.hybridassetinterestrate;
2 |
3 | public class RiskFactorFX implements RiskFactorID {
4 |
5 | private final String name;
6 |
7 | public RiskFactorFX(String name) {
8 | super();
9 | this.name = name;
10 | }
11 |
12 | @Override
13 | public String getName() {
14 | return name;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/hybridassetinterestrate/RiskFactorForwardRate.java:
--------------------------------------------------------------------------------
1 | package net.finmath.montecarlo.hybridassetinterestrate;
2 |
3 | public class RiskFactorForwardRate implements RiskFactorID {
4 |
5 | private final String name;
6 | private final double periodStart;
7 | private final double periodEnd;
8 |
9 | public RiskFactorForwardRate(String name, double periodStart, double periodEnd) {
10 | super();
11 | this.name = name;
12 | this.periodStart = periodStart;
13 | this.periodEnd = periodEnd;
14 | }
15 |
16 | @Override
17 | public String getName() {
18 | return name;
19 | }
20 |
21 | public double getPeriodStart() {
22 | return periodStart;
23 | }
24 |
25 | public double getPeriodEnd() {
26 | return periodEnd;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/hybridassetinterestrate/RiskFactorID.java:
--------------------------------------------------------------------------------
1 | package net.finmath.montecarlo.hybridassetinterestrate;
2 |
3 | public interface RiskFactorID {
4 |
5 | /**
6 | * @return The name of the risk factor.
7 | */
8 | String getName();
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/hybridassetinterestrate/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interfaces and classes needed to generate a Hybrid Asset LIBOR Market Model.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.montecarlo.hybridassetinterestrate;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/hybridassetinterestrate/products/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides classes which implement financial products which may be
3 | * valued using a net.finmath.montecarlo.hybridassetinterestrate.HybridAssetLIBORModelMonteCarloSimulation
.
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.montecarlo.hybridassetinterestrate.products;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/interestrate/LIBORModelCalibrationDiagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/finmath/finmath-lib/b7a1cb5ef752057feca7c048cc700a8f52e9676c/src/main/java/net/finmath/montecarlo/interestrate/LIBORModelCalibrationDiagram.png
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/interestrate/models/covariance/TermStructureCovarianceModel.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 24.12.2016
5 | */
6 | package net.finmath.montecarlo.interestrate.models.covariance;
7 |
8 | /**
9 | * A base class and interface description for the instantaneous covariance of
10 | * an forward rate interest rate model.
11 | *
12 | * @author Christian Fries
13 | * @version 1.0
14 | */
15 | public interface TermStructureCovarianceModel extends TermStructureTenorTimeScaling, TermStructureFactorLoadingsModel {
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/interestrate/models/covariance/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Contains covariance models and their calibration as plug-ins for the LIBOR market model and volatility and correlation models which may be used to build a covariance model.
3 | * Covariance models provide they free parameters via an interface. The class AbstractLIBORCovarianceModelParametric provides a method that implements the generic calibration of the models.
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.montecarlo.interestrate.models.covariance;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/interestrate/models/funding/DefaultFactors.java:
--------------------------------------------------------------------------------
1 | package net.finmath.montecarlo.interestrate.models.funding;
2 |
3 | import net.finmath.stochastic.RandomVariable;
4 |
5 | public class DefaultFactors {
6 | private final RandomVariable survivalProbability;
7 | private final RandomVariable defaultCompensation;
8 |
9 | public DefaultFactors(RandomVariable survivalProbability, RandomVariable defaultCompensation) {
10 | this.survivalProbability = survivalProbability;
11 | this.defaultCompensation = defaultCompensation;
12 | }
13 |
14 | public RandomVariable getSurvivalProbability() {
15 | return survivalProbability;
16 | }
17 |
18 | public RandomVariable getDefaultCompensation() {
19 | return defaultCompensation;
20 | }
21 | }
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/interestrate/models/funding/FundingCapacity.java:
--------------------------------------------------------------------------------
1 | package net.finmath.montecarlo.interestrate.models.funding;
2 |
3 | import net.finmath.stochastic.RandomVariable;
4 |
5 | public interface FundingCapacity {
6 |
7 | /**
8 | * Apply a new funding requirement to this funding capacity
9 | * and return the associated DefaultFactors
.
10 | *
11 | * @param time The time at which the funding is required.
12 | * @param fundingRequirement The required funding.
13 | * @return A DefaultFactors
that reflects the amount that has to be contracted to secure the funding.
14 | */
15 | DefaultFactors getDefaultFactors(double time, RandomVariable fundingRequirement);
16 |
17 | }
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/interestrate/models/funding/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Model components related to non-linear discounting / funding.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.montecarlo.interestrate.models.funding;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/interestrate/models/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Interest rate models implementing {@link net.finmath.montecarlo.model.ProcessModel}
3 | * e.g. by extending {@link net.finmath.montecarlo.model.AbstractProcessModel}.
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.montecarlo.interestrate.models;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/interestrate/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interfaces and classes needed to generate interest rate models model (using numerical
3 | * algorithms from net.finmath.montecarlo.process
.
4 | *
5 | * The basic interface and classes provide a TermStructureModel
which provides a
6 | * forward rate {@link net.finmath.montecarlo.interestrate.TermStructureModel#getForwardRate(net.finmath.montecarlo.process.MonteCarloProcess, double, double, double)}
7 | * and a
8 | * numeraire {@link net.finmath.montecarlo.interestrate.TermStructureModel#getNumeraire(net.finmath.montecarlo.process.MonteCarloProcess, double)}
9 | *
10 | * There is a legacy interface LIBORModel
which provides the
11 | * forward rates on a tenor time discretization under the name
12 | * {@link net.finmath.montecarlo.interestrate.LIBORModel#getLIBOR(net.finmath.montecarlo.process.MonteCarloProcess, int, int)}
13 | *
14 | * @author Christian Fries
15 | */
16 | package net.finmath.montecarlo.interestrate;
17 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/interestrate/products/components/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides a set product components which allow to build financial products by composition.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.montecarlo.interestrate.products.components;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/interestrate/products/indices/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides a set of indices which can be used as part of a period.
3 | *
4 | * @see net.finmath.montecarlo.interestrate.products.components.Period
5 | * @author Christian Fries
6 | */
7 | package net.finmath.montecarlo.interestrate.products.indices;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/interestrate/products/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides classes which implement financial products which may be
3 | * valued using a net.finmath.montecarlo.interestrate.LIBORModelMonteCarloSimulationModel
.
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.montecarlo.interestrate.products;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/interestrate/simple/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Simplified version of Monte-Carlo interest rate model - LIBOR Market Model.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.montecarlo.interestrate.simple;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/model/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides an interface and a base class for process models, i.e., models providing the parameters for
3 | * stochastic processes.
4 | *
5 | * The concept here is that we separate the numerical discretization scheme of an SDE from the parameterization of the SDE.
6 | *
7 | * @author Christian Fries
8 | */
9 | package net.finmath.montecarlo.model;
10 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides basic interfaces and classes used in Monte-Carlo models (like LIBOR market model or Monte-Carlo simulation
3 | * of a Black-Scholes model), e.g., the Monte-Carlo random variable and the Brownian motion.
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.montecarlo;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/process/ProcessTimeDiscretizationProvider.java:
--------------------------------------------------------------------------------
1 | package net.finmath.montecarlo.process;
2 |
3 | import java.time.LocalDateTime;
4 |
5 | import net.finmath.time.TimeDiscretization;
6 |
7 | /**
8 | * An object implementing this interfaces provides a suggestion for an optimal time-discretization
9 | * associated with this object.
10 | *
11 | * Examples are:
12 | *
13 | *
17 | *
18 | * @author Christian Fries
19 | */
20 | public interface ProcessTimeDiscretizationProvider {
21 |
22 | /**
23 | * Returns a suggestion for a time discretization which is suited (or required) for the processing (e.g valuation) of this object.
24 | *
25 | * @param referenceDate A reference date relative to which the discretization is generated.
26 | * @return A time discretization.
27 | */
28 | TimeDiscretization getProcessTimeDiscretization(LocalDateTime referenceDate);
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/process/component/barrier/ProcessWithBarrier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Created on 29.06.2008
3 | *
4 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
5 | */
6 | package net.finmath.montecarlo.process.component.barrier;
7 |
8 |
9 | /**
10 | * @author Christian Fries
11 | * @since finmath-lib 4.1.0
12 | * @version 1.0
13 | */
14 | public interface ProcessWithBarrier {
15 |
16 | Barrier getBarrier();
17 |
18 | void setBarrier(Barrier barrier);
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/process/component/barrier/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Components providing the barrier in the Monte-Carlo simulation with barrier.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.montecarlo.process.component.barrier;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/process/component/factortransform/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Components providing the factor drift in the simulation of a proxy simulation scheme.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.montecarlo.process.component.factortransform;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/process/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Interfaced for stochastic processes and numerical schemes for stochastic processes (SDEs), like the Euler scheme.
3 | * The Euler scheme implementation is more generic and can be configured for
4 | * log-Euler scheme or predictor corrector scheme.
5 | *
6 | * The parameters have to be provided by a process model.
7 | *
8 | * @see net.finmath.montecarlo.model
9 | * @author Christian Fries
10 | */
11 | package net.finmath.montecarlo.process;
12 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/products/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Products which are model independent, but assume a Monte-Carlo simulation.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.montecarlo.products;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/templatemethoddesign/MonteCalorBlackScholesModelTemplateMethodDesign.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/finmath/finmath-lib/b7a1cb5ef752057feca7c048cc700a8f52e9676c/src/main/java/net/finmath/montecarlo/templatemethoddesign/MonteCalorBlackScholesModelTemplateMethodDesign.png
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/templatemethoddesign/assetderivativevaluation/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Legacy classes related to Monte-Carlo simulation - used for teaching only.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.montecarlo.templatemethoddesign.assetderivativevaluation;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/montecarlo/templatemethoddesign/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Legacy classes related to Monte-Carlo simulation - used for teaching only.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.montecarlo.templatemethoddesign;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/optimizer/OptimizerFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 29.05.2015
5 | */
6 |
7 | package net.finmath.optimizer;
8 |
9 | import net.finmath.optimizer.Optimizer.ObjectiveFunction;
10 |
11 | /**
12 | * @author Christian Fries
13 | *
14 | * @version 1.0
15 | */
16 | public interface OptimizerFactory {
17 |
18 | Optimizer getOptimizer(ObjectiveFunction objectiveFunction, double[] initialParameters, double[] targetValues);
19 |
20 | Optimizer getOptimizer(ObjectiveFunction objectiveFunction, double[] initialParameters, double[] lowerBound, double[] upperBound, double[] targetValues);
21 |
22 | Optimizer getOptimizer(ObjectiveFunction objectiveFunction, double[] initialParameters, double[] lowerBound, double[] upperBound, double[] parameterStep, double[] targetValues);
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/parser/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Contains classes for parsing files.
3 | *
4 | * @author Roland Bachl
5 | */
6 | package net.finmath.parser;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/randomnumbers/RandomNumberGenerator.java:
--------------------------------------------------------------------------------
1 | package net.finmath.randomnumbers;
2 |
3 | import java.io.Serializable;
4 |
5 | /**
6 | * Interface for an n-dimensional random number generator
7 | * generating a sequence of vectors sampling the space [0,1]^{n}
8 | *
9 | * @author Christian Fries
10 | * @version 1.0
11 | */
12 | public interface RandomNumberGenerator extends Serializable {
13 |
14 | /**
15 | * Get the next sample vector of dimension n, where n is getDimension
.
16 | *
17 | * An implementation has to be thread safe.
18 | *
19 | * @return The next sample vector of dimension n, where n is getDimension
.
20 | */
21 | double[] getNext();
22 |
23 | /**
24 | * Get the sample vector dimension.
25 | *
26 | * @return The sample vector dimension n.
27 | */
28 | int getDimension();
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/randomnumbers/SobolSequence1D.java:
--------------------------------------------------------------------------------
1 | package net.finmath.randomnumbers;
2 |
3 | /**
4 | * Implements a multi-dimensional Sobol sequence.
5 | *
6 | * The class is just a wrapper to Apache commons-math implementation
7 | * in order to implement the interfaces RandomNumberGenerator1D
8 | * and {@link java.util.function.DoubleSupplier}.
9 | *
10 | * @author Christian Fries
11 | * @version 1.0
12 | */
13 | public class SobolSequence1D implements RandomNumberGenerator1D {
14 |
15 | private static final long serialVersionUID = 1368710922067034251L;
16 |
17 | private final SobolSequence sobolSequence;
18 |
19 | /**
20 | * Create a Sobol sequence.
21 | */
22 | public SobolSequence1D() {
23 | super();
24 | sobolSequence = new SobolSequence(1);
25 | }
26 |
27 | @Override
28 | public double nextDouble() {
29 | return sobolSequence.getNext()[0];
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/randomnumbers/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Random number generators for samples of uniform distributed random variables and generators and transformation for other distriburtions.
3 | *
4 | * Classes in this package provide wrappers for random number generators from thirs party libraries (e.g. Mersenne-Twister from commons-math),
5 | * native implementation of quasi random number gerantors (e.g. Halton sequence) and algorithm to sample other distributions
6 | * (like the Acceptance-Rejection method).
7 | *
8 | * @author Christian Fries
9 | */
10 | package net.finmath.randomnumbers;
11 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/rootfinder/AbstractRootFinder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Created on 12.10.2007
3 | *
4 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
5 | */
6 | package net.finmath.rootfinder;
7 |
8 | /**
9 | * @author Christian Fries
10 | * @version 1.0
11 | */
12 | public abstract class AbstractRootFinder implements RootFinder, RootFinderWithDerivative {
13 |
14 | @Override
15 | public void setValueAndDerivative(final double value, final double derivative) {
16 | setValue(value);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/rootfinder/StochasticRootFinder.java:
--------------------------------------------------------------------------------
1 | package net.finmath.rootfinder;
2 |
3 | import net.finmath.stochastic.RandomVariable;
4 |
5 | /**
6 | * @author Christian Fries
7 | * @author Stefan Sedlmair
8 | * @version 1.0
9 | */
10 | public interface StochasticRootFinder {
11 |
12 | /**
13 | * @return Next point for which a value should be set using setValue
.
14 | */
15 | RandomVariable getNextPoint();
16 |
17 | /**
18 | * @param value Value corresponding to point returned
19 | * by previous getNextPoint
call.
20 | */
21 | void setValue(RandomVariable value);
22 |
23 | /**
24 | * @return Returns the numberOfIterations.
25 | */
26 | int getNumberOfIterations();
27 |
28 | /**
29 | * @return Best point obtained so far
30 | */
31 | RandomVariable getBestPoint();
32 |
33 | /**
34 | * @return Returns the accuracy.
35 | */
36 | double getAccuracy();
37 |
38 | /**
39 | * @return Returns true if further improvement is not possible.
40 | */
41 | boolean isDone();
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/rootfinder/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Interfaces and classes provided variantes of one dimensional root finder to solve
3 | * f(x) = 0, like Bisection Search, Newtons Method.
4 | * An application of the solver is the calculation of the implied volatiltiy.
5 | *
6 | * @author Christian Fries
7 | */
8 | package net.finmath.rootfinder;
9 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/singleswaprate/annuitymapping/ConstantNormalizer.java:
--------------------------------------------------------------------------------
1 | package net.finmath.singleswaprate.annuitymapping;
2 |
3 | /**
4 | * Constant normalizer returning the value one.
5 | *
6 | * @author Christian Fries
7 | * @author Roland Bachl
8 | *
9 | */
10 | public class ConstantNormalizer implements NormalizingFunction {
11 |
12 | @Override
13 | public double getValue(final double swapRate) {
14 | return 1;
15 | }
16 |
17 | @Override
18 | public double getFirstDerivative(final double swapRate) {
19 | return 0;
20 | }
21 |
22 | @Override
23 | public double getSecondDerivative(final double swapRate) {
24 | return 0;
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/singleswaprate/annuitymapping/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Classes providing options for the annuity mapping function. These replace the annuity, which is dependent on bonds of multiple maturities, with a function that solely
3 | * depends on a single swap rate. Thus allowing to use vanilla models where otherwise term structure models would be necessary.
4 | *
5 | * @author Christian Fries
6 | * @author Roland Bachl
7 | */
8 | package net.finmath.singleswaprate.annuitymapping;
9 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/singleswaprate/calibration/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Classes providing calibration to market data of volatility cubes.
3 | *
4 | * @author Christian Fries
5 | * @author Roland Bachl
6 | */
7 | package net.finmath.singleswaprate.calibration;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/singleswaprate/data/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides classes to store and interact with market data.
3 | *
4 | * @author Christian Fries
5 | * @author Roland Bachl
6 | */
7 | package net.finmath.singleswaprate.data;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/singleswaprate/model/curves/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Additional curves for use in an analytic model, {@link net.finmath.marketdata.model.AnalyticModel}.
3 | *
4 | * @author Christian Fries
5 | * @author Roland Bachl
6 | */
7 | package net.finmath.singleswaprate.model.curves;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/singleswaprate/model/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Classes extending the regular analytic model, see {@link net.finmath.marketdata.model}, with the capacity to hold volatility cubes,
3 | * see {@link net.finmath.singleswaprate.model.volatilities.VolatilityCube}.
4 | *
5 | * @author Christian Fries
6 | * @author Roland Bachl
7 | */
8 | package net.finmath.singleswaprate.model;
9 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/singleswaprate/model/volatilities/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interface specification and implementation of volatility cubes, as well as a factory to create these, either via calibration from market data or construction
3 | * from parameters. Generally these cubes store normal implied volatilities of physically settled swaptions.
4 | *
5 | * @author Christian Fries
6 | * @author Roland Bachl
7 | */
8 | package net.finmath.singleswaprate.model.volatilities;
9 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/singleswaprate/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Contains all classes related to interest rate derivatives, which are evaluated by a change of measure to the annuity measure of a single swap rate.
3 | * Most notable examples include the cash settled swaption and the constant maturity swap.
4 | *
5 | * @author Christian Fries
6 | * @author Roland Bachl
7 | *
8 | */
9 | package net.finmath.singleswaprate;
10 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/singleswaprate/products/AnalyticVolatilityCubeProduct.java:
--------------------------------------------------------------------------------
1 | package net.finmath.singleswaprate.products;
2 |
3 | import net.finmath.marketdata.products.AnalyticProduct;
4 | import net.finmath.singleswaprate.model.VolatilityCubeModel;
5 |
6 | /**
7 | * The interface of a product to be evaluated using a {@link VolatilityCubeModel}.
8 | *
9 | * @author Christian Fries
10 | * @author Roland Bachl
11 | *
12 | */
13 | public interface AnalyticVolatilityCubeProduct extends AnalyticProduct {
14 |
15 | /**
16 | * Return the valuation of the product using the given model.
17 | * The model has to implement the modes of {@link VolatilityCubeModel}.
18 | *
19 | * @param evaluationTime The evaluation time as double. Cash flows prior and including this time are not considered.
20 | * @param model The model under which the product is valued.
21 | * @return The value of the product using the given model.
22 | */
23 | double getValue(double evaluationTime, VolatilityCubeModel model);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/singleswaprate/products/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interface specification and implementation of product based on a single interest rate curve.
3 | *
4 | * @author Christian Fries
5 | * @author Roland Bachl
6 | */
7 | package net.finmath.singleswaprate.products;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/stochastic/ConditionalExpectationEstimator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 13.08.2004
5 | */
6 | package net.finmath.stochastic;
7 |
8 | /**
9 | * The interface which has to be implemented by a fixed conditional expectation operator,
10 | * i.e., E( · | Z ) for a fixed Z.
11 | *
12 | * @author Christian Fries
13 | * @version 1.0
14 | */
15 | public interface ConditionalExpectationEstimator {
16 |
17 | /**
18 | * Return the conditional expectation of a given random variable.
19 | * The definition of the filtration time is part of the object implementing this interface.
20 | *
21 | * @param randomVariable Given random variable.
22 | * @return The conditional expectation of randomVariable
.
23 | */
24 | RandomVariable getConditionalExpectation(RandomVariable randomVariable);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/stochastic/RandomVariable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/finmath/finmath-lib/b7a1cb5ef752057feca7c048cc700a8f52e9676c/src/main/java/net/finmath/stochastic/RandomVariable.png
--------------------------------------------------------------------------------
/src/main/java/net/finmath/stochastic/RandomVariableAccumulator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 29.06.2013
5 | */
6 | package net.finmath.stochastic;
7 |
8 |
9 | /**
10 | * The interface implemented by a mutable random variable accumulator.
11 | * An object of this class accumulates other random variables.
12 | * The classical application is the accumulation of discounted cash flows.
13 | *
14 | * @author Christian Fries
15 | * @version 1.3
16 | */
17 | public interface RandomVariableAccumulator extends RandomVariable {
18 |
19 | void accumulate(RandomVariable randomVariable);
20 | void accumulate(double time, RandomVariable randomVariable);
21 |
22 | RandomVariable get();
23 | RandomVariable get(double fromTime, double toTime);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/stochastic/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Interfaces specifying operations on random variables. For implementation see also
3 | * {@link net.finmath.montecarlo} e.g. {@link net.finmath.montecarlo.RandomVariableFromDoubleArray}.
4 | *
5 | * @author Christian Fries
6 | */
7 | package net.finmath.stochastic;
8 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/swing/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides utilities for Java swing (used in finmath applets).
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.swing;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/time/Tenor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 07.09.2013
5 | */
6 |
7 | package net.finmath.time;
8 |
9 | import java.time.LocalDate;
10 |
11 | /**
12 | * @author Christian Fries
13 | *
14 | * @version 1.0
15 | */
16 | public interface Tenor {
17 |
18 | /**
19 | * @return The reference date of this tenor, i.e., the date mapped to 0.0
20 | */
21 | LocalDate getReferenceDate();
22 |
23 | /**
24 | * Returns the date for the given time index.
25 | *
26 | * @param timeIndex Time index
27 | * @return Returns the date for a given time index.
28 | */
29 | LocalDate getDate(int timeIndex);
30 |
31 | /**
32 | * Returns the day count fraction for the period form timeIndex to to timeIndex+1.
33 | *
34 | * @param timeIndex Time index
35 | * @return Returns the day count fraction.
36 | */
37 | double getDaycountFraction(int timeIndex);
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/time/businessdaycalendar/BusinessdayCalendarAny.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 15.09.2013
5 | */
6 |
7 | package net.finmath.time.businessdaycalendar;
8 |
9 | import java.time.LocalDate;
10 |
11 | /**
12 | * A business day calendar, where every day is a business day.
13 | *
14 | * @author Christian Fries
15 | * @version 1.0
16 | */
17 | public class BusinessdayCalendarAny extends AbstractBusinessdayCalendar {
18 |
19 | private static final long serialVersionUID = -2440422998196510638L;
20 |
21 | /**
22 | * Create a business day calendar, where every day is a business day.
23 | */
24 | public BusinessdayCalendarAny() {
25 | }
26 |
27 | @Override
28 | public boolean isBusinessday(final LocalDate date) {
29 | return true;
30 | }
31 |
32 | @Override
33 | public String toString() {
34 | return "BusinessdayCalendarAny";
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/time/businessdaycalendar/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides business day calendars, e.g., as used in date roll conventions.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.time.businessdaycalendar;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/time/daycount/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides various day count conventions, e.g., as used in the definition of coupon payments of interest rate products.
3 | *
4 | * @author Christian Fries
5 | */
6 | package net.finmath.time.daycount;
7 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/time/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Provides interfaces and classes for time discretizations, tenors and (swap) schedule generation.
3 | * The swap schedule generation used business day calendars from net.finmath.time.businessdaycalendar
4 | * for date roll conventions.
5 | *
6 | * @author Christian Fries
7 | */
8 | package net.finmath.time;
9 |
--------------------------------------------------------------------------------
/src/main/java/net/finmath/timeseries/MarketData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * (c) Copyright Christian P. Fries, Germany. Contact: email@christian-fries.de.
3 | *
4 | * Created on 13.04.2014
5 | */
6 |
7 | package net.finmath.timeseries;
8 |
9 | import java.util.Calendar;
10 | import java.util.Map;
11 |
12 | /**
13 | * A set of raw data associated with a given date.
14 | *
15 | * @author Christian Fries
16 | * @version 1.0
17 | */
18 | public class MarketData {
19 |
20 | private final Calendar date;
21 | private final Map