Skip to content

Commit

Permalink
Features:
Browse files Browse the repository at this point in the history
Bug Fixes/Re-organization:

	- Special Function Hypergeometric Euler Quadrature Estimator - Derivative (34, 35, 36)
	- Special Function Hypergeometric Euler Quadrature Estimator - Albinate (37, 38)
	- Special Function Hypergeometric Series Estimator #1 (39, 40, 41)
	- Special Function Hypergeometric Series Estimator #2 (42, 43)
	- Special Function Hypergeometric Series Estimator - Constructor (44, 45)
	- Special Function Hypergeometric Series Estimator - Pochhammer (46, 47, 48)
	- Special Function Hypergeometric Pochhammer Series Term (49, 50, 51)
	- Special Function Hypergeometric Pochhammer Series Term - Parameters (52, 53)
	- Special Function Hypergeometric Pochhammer Series Term - Constructor (54, 55)
	- Special Function Hypergeometric Pochhammer Series Term - Value (56, 57, 58)
	- Special Function Hypergeometric Pochhammer Series (59, 60)


Samples:

IdeaDRIP:

	- Currencies as Risk Factors in Global Portfolios (1-33)
  • Loading branch information
Lakshmik committed Feb 26, 2024
1 parent c0dc26e commit 525d656
Show file tree
Hide file tree
Showing 6 changed files with 156 additions and 118 deletions.
23 changes: 23 additions & 0 deletions ReleaseNotes/07_27_2023.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

Features:

Bug Fixes/Re-organization:

- Special Function Hypergeometric Euler Quadrature Estimator - Derivative (34, 35, 36)
- Special Function Hypergeometric Euler Quadrature Estimator - Albinate (37, 38)
- Special Function Hypergeometric Series Estimator #1 (39, 40, 41)
- Special Function Hypergeometric Series Estimator #2 (42, 43)
- Special Function Hypergeometric Series Estimator - Constructor (44, 45)
- Special Function Hypergeometric Series Estimator - Pochhammer (46, 47, 48)
- Special Function Hypergeometric Pochhammer Series Term (49, 50, 51)
- Special Function Hypergeometric Pochhammer Series Term - Parameters (52, 53)
- Special Function Hypergeometric Pochhammer Series Term - Constructor (54, 55)
- Special Function Hypergeometric Pochhammer Series Term - Value (56, 57, 58)
- Special Function Hypergeometric Pochhammer Series (59, 60)


Samples:

IdeaDRIP:

- Currencies as Risk Factors in Global Portfolios (1-33)
Binary file modified ScheduleSheet.xlsx
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,9 @@ public R2ToR1 logBetaEstimator()
@Override public double derivative (
final double z,
final int order)
throws java.lang.Exception
throws Exception
{
org.drip.specialfunction.definition.HypergeometricParameters hypergeometricParameters =
hypergeometricParameters();
HypergeometricParameters hypergeometricParameters = hypergeometricParameters();

double a = hypergeometricParameters.a();

Expand All @@ -233,49 +232,34 @@ public R2ToR1 logBetaEstimator()
double c = hypergeometricParameters.c();

return new EulerQuadratureEstimator (
new org.drip.specialfunction.definition.HypergeometricParameters (
a + order,
b + order,
c + order
),
new HypergeometricParameters (a + order, b + order, c + order),
_logBetaEstimator,
_quadratureCount
).regularHypergeometric (z) * org.drip.numerical.common.NumberUtil.PochhammerSymbol (
a,
order
) * org.drip.numerical.common.NumberUtil.PochhammerSymbol (
b,
order
) / org.drip.numerical.common.NumberUtil.PochhammerSymbol (
c,
order
);
).regularHypergeometric (z) * NumberUtil.PochhammerSymbol (a, order) *
NumberUtil.PochhammerSymbol (b, order) /
NumberUtil.PochhammerSymbol (c, order);
}

@Override public org.drip.specialfunction.definition.RegularHypergeometricEstimator albinate (
final org.drip.specialfunction.definition.HypergeometricParameters hypergeometricParametersAlbinate,
final org.drip.function.definition.R1ToR1 valueScaler,
final org.drip.function.definition.R1ToR1 zTransformer)
@Override public RegularHypergeometricEstimator albinate (
final HypergeometricParameters hypergeometricParametersAlbinate,
final R1ToR1 valueScaler,
final R1ToR1 zTransformer)
{
try
{
try {
return new EulerQuadratureEstimator (
hypergeometricParametersAlbinate,
_logBetaEstimator,
_quadratureCount
)
_quadratureCount)
{
@Override public double regularHypergeometric (
final double z)
throws java.lang.Exception
throws Exception
{
return (null == valueScaler ? 1. : valueScaler.evaluate (z)) *
super.regularHypergeometric (null == zTransformer ? z : zTransformer.evaluate (z));
}
};
}
catch (java.lang.Exception e)
{
} catch (Exception e) {
e.printStackTrace();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@

package org.drip.specialfunction.hypergeometric;

import java.util.TreeMap;

import org.drip.numerical.estimation.R1ToR1Series;
import org.drip.specialfunction.definition.HypergeometricParameters;

/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/

/*!
* Copyright (C) 2025 Lakshmi Krishnamurthy
* Copyright (C) 2024 Lakshmi Krishnamurthy
* Copyright (C) 2023 Lakshmi Krishnamurthy
* Copyright (C) 2022 Lakshmi Krishnamurthy
* Copyright (C) 2021 Lakshmi Krishnamurthy
* Copyright (C) 2020 Lakshmi Krishnamurthy
Expand Down Expand Up @@ -78,7 +86,7 @@

/**
* <i>PochhammerSeries</i> refers to the Estimation of the Hyper-geometric Function using the Pochhammer
* Series Expansion. The References are:
* Series Expansion. The References are:
*
* <br><br>
* <ul>
Expand All @@ -103,15 +111,27 @@
* Wikipedia (2019): Hyper-geometric Function https://en.wikipedia.org/wiki/Hypergeometric_function
* </li>
* </ul>
*
* It provides the following functionality:
*
* <br><br>
* <ul>
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></li>
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></li>
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/README.md">Special Function Implementation Analysis</a></li>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/hypergeometric/README.md">Hyper-geometric Function Estimation Schemes</a></li>
* <li>Construct the R<sup>1</sup> To R<sup>1</sup> Pochhammer Cumulative Series</li>
* </ul>
*
* <br>
* <style>table, td, th {
* padding: 1px; border: 2px solid #008000; border-radius: 8px; background-color: #dfff00;
* text-align: center; color: #0000ff;
* }
* </style>
*
* <table style="border:1px solid black;margin-left:auto;margin-right:auto;">
* <tr><td><b>Module </b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></td></tr>
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></td></tr>
* <tr><td><b>Project</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/README.md">Special Function Implementation and Analysis</a></td></tr>
* <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/hypergeometric/README.md">Hyper-geometric Function Estimation Schemes</a></td></tr>
* </table>
*
* @author Lakshmi Krishnamurthy
*/

Expand All @@ -127,31 +147,23 @@ public class PochhammerSeries
* @return The R<sup>1</sup> To R<sup>1</sup> Pochhammer Cumulative Series
*/

public static final org.drip.numerical.estimation.R1ToR1Series Create (
final org.drip.specialfunction.definition.HypergeometricParameters hypergeometricParameters,
public static final R1ToR1Series Create (
final HypergeometricParameters hypergeometricParameters,
final int termCount)
{
try
{
java.util.TreeMap<java.lang.Integer, java.lang.Double> termWeightMap = new
java.util.TreeMap<java.lang.Integer, java.lang.Double>();
try {
TreeMap<Integer, Double> termWeightMap = new TreeMap<Integer, Double>();

for (int termIndex = 0; termIndex <= termCount; ++termIndex)
{
termWeightMap.put (
termIndex,
1.
);
for (int termIndex = 0; termIndex <= termCount; ++termIndex) {
termWeightMap.put (termIndex, 1.);
}

return new org.drip.numerical.estimation.R1ToR1Series (
new org.drip.specialfunction.hypergeometric.PochhammerSeriesTerm (hypergeometricParameters),
return new R1ToR1Series (
new PochhammerSeriesTerm (hypergeometricParameters),
false,
termWeightMap
);
}
catch (java.lang.Exception e)
{
} catch (Exception e) {
e.printStackTrace();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@

package org.drip.specialfunction.hypergeometric;

import org.drip.numerical.common.NumberUtil;
import org.drip.numerical.estimation.R1ToR1SeriesTerm;
import org.drip.specialfunction.definition.HypergeometricParameters;

/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/

/*!
* Copyright (C) 2025 Lakshmi Krishnamurthy
* Copyright (C) 2024 Lakshmi Krishnamurthy
* Copyright (C) 2023 Lakshmi Krishnamurthy
* Copyright (C) 2022 Lakshmi Krishnamurthy
* Copyright (C) 2021 Lakshmi Krishnamurthy
* Copyright (C) 2020 Lakshmi Krishnamurthy
Expand Down Expand Up @@ -78,7 +85,7 @@

/**
* <i>PochhammerSeriesTerm</i> refers to a Single Series Term in the Pochhammer Series Expansion of the
* Hyper-geometric Function. The References are:
* Hyper-geometric Function. The References are:
*
* <br><br>
* <ul>
Expand All @@ -103,37 +110,49 @@
* Wikipedia (2019): Hyper-geometric Function https://en.wikipedia.org/wiki/Hypergeometric_function
* </li>
* </ul>
*
* It provides the following functionality:
*
* <br><br>
* <ul>
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></li>
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></li>
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/README.md">Special Function Implementation Analysis</a></li>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/hypergeometric/README.md">Hyper-geometric Function Estimation Schemes</a></li>
* <li><i>PochhammerSeriesTerm</i> Constructor</li>
* <li>Retrieve the Hyper-geometric Parameters</li>
* </ul>
*
* <br>
* <style>table, td, th {
* padding: 1px; border: 2px solid #008000; border-radius: 8px; background-color: #dfff00;
* text-align: center; color: #0000ff;
* }
* </style>
*
* <table style="border:1px solid black;margin-left:auto;margin-right:auto;">
* <tr><td><b>Module </b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></td></tr>
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></td></tr>
* <tr><td><b>Project</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/README.md">Special Function Implementation and Analysis</a></td></tr>
* <tr><td><b>Package</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/hypergeometric/README.md">Hyper-geometric Function Estimation Schemes</a></td></tr>
* </table>
*
* @author Lakshmi Krishnamurthy
*/

public class PochhammerSeriesTerm extends org.drip.numerical.estimation.R1ToR1SeriesTerm
public class PochhammerSeriesTerm extends R1ToR1SeriesTerm
{
private org.drip.specialfunction.definition.HypergeometricParameters _hypergeometricParameters = null;
private HypergeometricParameters _hypergeometricParameters = null;

/**
* PochhammerSeriesTerm Constructor
* <i>PochhammerSeriesTerm</i> Constructor
*
* @param hypergeometricParameters The Hyper-geometric Parameters
*
* @throws java.lang.Exception Thrown if the Inputs are Invalid
* @throws Exception Thrown if the Inputs are Invalid
*/

public PochhammerSeriesTerm (
final org.drip.specialfunction.definition.HypergeometricParameters hypergeometricParameters)
throws java.lang.Exception
final HypergeometricParameters hypergeometricParameters)
throws Exception
{
if (null == (_hypergeometricParameters = hypergeometricParameters))
{
throw new java.lang.Exception ("PochhammerSeriesTerm Constructor => Invalid Inputs");
if (null == (_hypergeometricParameters = hypergeometricParameters)) {
throw new Exception ("PochhammerSeriesTerm Constructor => Invalid Inputs");
}
}

Expand All @@ -143,36 +162,25 @@ public PochhammerSeriesTerm (
* @return The Hyper-geometric Parameters
*/

public org.drip.specialfunction.definition.HypergeometricParameters hypergeometricParameters()
public HypergeometricParameters hypergeometricParameters()
{
return _hypergeometricParameters;
}

@Override public double value (
final int order,
final double z)
throws java.lang.Exception
throws Exception
{
if (0 > order)
{
throw new java.lang.Exception ("PochhammerSeriesTerm::value => Invalid Inputs");
if (0 > order) {
throw new Exception ("PochhammerSeriesTerm::value => Invalid Inputs");
}

org.drip.specialfunction.definition.HypergeometricParameters hypergeometricParameters =
hypergeometricParameters();
HypergeometricParameters hypergeometricParameters = hypergeometricParameters();

return org.drip.numerical.common.NumberUtil.RisingPochhammerSymbol (
hypergeometricParameters.a(),
order
) * org.drip.numerical.common.NumberUtil.RisingPochhammerSymbol (
hypergeometricParameters.b(),
order
) / org.drip.numerical.common.NumberUtil.RisingPochhammerSymbol (
hypergeometricParameters.c(),
order
) * java.lang.Math.pow (
z,
order
) / org.drip.numerical.common.NumberUtil.Factorial (order);
return NumberUtil.RisingPochhammerSymbol (hypergeometricParameters.a(), order) *
NumberUtil.RisingPochhammerSymbol (hypergeometricParameters.b(), order) /
NumberUtil.RisingPochhammerSymbol (hypergeometricParameters.c(), order) *
Math.pow (z, order) / NumberUtil.Factorial (order);
}
}
Loading

0 comments on commit 525d656

Please sign in to comment.