net.finmath.modelling.descriptor.SingleAssetFourierProductFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of finmath-lib Show documentation
Show all versions of finmath-lib Show documentation
finmath lib is a Mathematical Finance Library in Java.
It provides algorithms and methodologies related to mathematical finance.
/*
* (c) Copyright Christian P. Fries, Germany. Contact: [email protected].
*
* Created on 09.02.2018
*/
package net.finmath.modelling.descriptor;
import net.finmath.modelling.Product;
import net.finmath.modelling.ProductFactory;
import net.finmath.modelling.SingleAssetProductDescriptor;
/**
* @author Christian Fries
*/
public class SingleAssetFourierProductFactory implements ProductFactory {
/**
* Create factory.
*/
public SingleAssetFourierProductFactory() {
}
@Override
public Product extends SingleAssetProductDescriptor> getProductFromDescription(SingleAssetProductDescriptor descriptor) {
if(descriptor instanceof SingleAssetEuropeanOptionProductDescriptor) {
final Product product = new net.finmath.fouriermethod.products.EuropeanOption((SingleAssetEuropeanOptionProductDescriptor) descriptor);
return product;
}
else {
String name = descriptor.name();
throw new IllegalArgumentException("Unsupported product type " + name);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy