Skip to content

Commit

Permalink
Features:
Browse files Browse the repository at this point in the history
	- Riskless Units Constraint Generator Function (1, 2, 3)
	- Bid/Ask Indifference Claims Handler (4, 5)


Bug Fixes/Re-organization:

	- Special Function Bessel First Frobenius Series Term (6, 7, 8)
	- Special Function Bessel First Frobenius Series Term - Gamma Estimator (9, 10)
	- Special Function Bessel First Frobenius Series Term - Constructor (11, 12)
	- Special Function Bessel First Frobenius Series Term - Value (13, 14)
	- Special Function Bessel First Frobenius Series (15, 16)
	- Special Function Bessel First Frobenius Series - Summation (17, 18, 19)
	- Special Function Bessel First Frobenius Series Estimator #1 (20, 21)
	- Special Function Bessel First Frobenius Series Estimator #2 (22, 23)
	- Special Function Bessel First Frobenius Series Estimator - Constructor (24, 25)
	- Special Function Bessel First Frobenius Series Estimator - BigJ (26)
	- Special Function Bessel First Frobenius Series Estimator - Standard (27, 28)
	- Special Function Bessel First Schlafli Integral Estimator (29, 30, 31)
	- Special Function Bessel First Schlafli Integral Estimator - Quadrature Count (32, 33)
	- Special Function Bessel First Schlafli Integral Estimator - Constructor (34)
	- Special Function Bessel First Schlafli Integral Estimator - Non-integer Form (35, 36, 37)
	- Special Function Bessel First Schlafli Integral Estimator - Integer Form (38, 39, 40)
	- Special Function Bessel Hankel Asymptote Series Term (41, 42, 43)
	- Special Function Bessel Hankel Asymptote Series Term - Flip (44, 45)
	- Special Function Bessel Hankel Asymptote Series Term - Constructor (46)
	- Special Function Bessel Hankel Asymptote Series Term - Value (47, 48, 49)
	- Special Function Bessel Hankel Asymptote Series (50, 51)
	- Special Function Bessel Hankel Asymptote Series - Summation (52, 53, 54)
	- Special Function Bessel Modified First Frobenius Series Term (55, 56, 57)
	- Special Function Bessel Modified First Frobenius Series Term - Gamma (58, 59)
	- Special Function Bessel Modified First Frobenius Series Term - Constructor (60)


Samples:

IdeaDRIP:
  • Loading branch information
Lakshmik committed Jan 19, 2024
1 parent 280405b commit c52c06d
Show file tree
Hide file tree
Showing 10 changed files with 381 additions and 224 deletions.
39 changes: 39 additions & 0 deletions ReleaseNotes/05_18_2023.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

Features:

- Riskless Units Constraint Generator Function (1, 2, 3)
- Bid/Ask Indifference Claims Handler (4, 5)


Bug Fixes/Re-organization:

- Special Function Bessel First Frobenius Series Term (6, 7, 8)
- Special Function Bessel First Frobenius Series Term - Gamma Estimator (9, 10)
- Special Function Bessel First Frobenius Series Term - Constructor (11, 12)
- Special Function Bessel First Frobenius Series Term - Value (13, 14)
- Special Function Bessel First Frobenius Series (15, 16)
- Special Function Bessel First Frobenius Series - Summation (17, 18, 19)
- Special Function Bessel First Frobenius Series Estimator #1 (20, 21)
- Special Function Bessel First Frobenius Series Estimator #2 (22, 23)
- Special Function Bessel First Frobenius Series Estimator - Constructor (24, 25)
- Special Function Bessel First Frobenius Series Estimator - BigJ (26)
- Special Function Bessel First Frobenius Series Estimator - Standard (27, 28)
- Special Function Bessel First Schlafli Integral Estimator (29, 30, 31)
- Special Function Bessel First Schlafli Integral Estimator - Quadrature Count (32, 33)
- Special Function Bessel First Schlafli Integral Estimator - Constructor (34)
- Special Function Bessel First Schlafli Integral Estimator - Non-integer Form (35, 36, 37)
- Special Function Bessel First Schlafli Integral Estimator - Integer Form (38, 39, 40)
- Special Function Bessel Hankel Asymptote Series Term (41, 42, 43)
- Special Function Bessel Hankel Asymptote Series Term - Flip (44, 45)
- Special Function Bessel Hankel Asymptote Series Term - Constructor (46)
- Special Function Bessel Hankel Asymptote Series Term - Value (47, 48, 49)
- Special Function Bessel Hankel Asymptote Series (50, 51)
- Special Function Bessel Hankel Asymptote Series - Summation (52, 53, 54)
- Special Function Bessel Modified First Frobenius Series Term (55, 56, 57)
- Special Function Bessel Modified First Frobenius Series Term - Gamma (58, 59)
- Special Function Bessel Modified First Frobenius Series Term - Constructor (60)


Samples:

IdeaDRIP:
Binary file modified ScheduleSheet.xlsx
Binary file not shown.
46 changes: 45 additions & 1 deletion src/main/java/org/drip/oms/indifference/ReservationPricer.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.drip.function.definition.R1ToR1;
import org.drip.measure.continuous.R1Univariate;
import org.drip.measure.discrete.R1Distribution;
import org.drip.numerical.common.NumberUtil;
import org.drip.numerical.integration.R1ToR1Integrator;

/*
Expand Down Expand Up @@ -118,6 +119,7 @@ public class ReservationPricer
{
private double _endowmentValue = Double.NaN;
private R1ToR1 _privateValuationUtilityFunction = null;
private BidAskClaimsHandler _bidAskClaimsHandler = null;

private double expectedTerminalUtilityPrice (
final R1Distribution terminalDistribution)
Expand Down Expand Up @@ -148,7 +150,7 @@ public double expectedTerminalUtilityPrice (
if (null == terminalDistribution)
{
throw new Exception (
"ReservationPricer::expectedUtility => Invalid Terminal Distribution"
"ReservationPricer::expectedTerminalUtilityPrice => Invalid Terminal Distribution"
);
}

Expand Down Expand Up @@ -191,6 +193,17 @@ public double endowmentValue()
return _endowmentValue;
}

/**
* Retrieve the Bid/Ask Claims Handler
*
* @return The Bid/Ask Claims Handler
*/

public BidAskClaimsHandler bidAskClaimsHandler()
{
return _bidAskClaimsHandler;
}

/**
* Evaluate the Expected Terminal Endowment Utility Price
*
Expand Down Expand Up @@ -258,4 +271,35 @@ public double expectedTerminalClaimsUtilityPrice (
{
return expectedTerminalUtilityPrice (terminalClaimsDistribution);
}

/**
* Generate the Function to calculate the Riskless Security Units from the Endowment Value
*
* @param risklessPrice Riskless Security Unit Price
* @param underlierPrice Underlier Security Unit Price
*
* @return Riskless Units Constraint Function
*/

public R1ToR1 risklessUnitsConstraintFunction (
final double risklessPrice,
final double underlierPrice)
{
return !NumberUtil.IsValid (risklessPrice) || !NumberUtil.IsValid (underlierPrice) ?
null : new R1ToR1 (null)
{
@Override public double evaluate (
double underlierUnits)
throws Exception
{
return (_endowmentValue - underlierPrice * underlierUnits) / risklessPrice;
}
};
}

public UtilityOptimizationRun baselineIndifferenceRun (
final R1ToR1 risklessUnitsConstraintFunction)
{
return null;
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@

package org.drip.specialfunction.bessel;

import java.util.TreeMap;

import org.drip.function.definition.R1ToR1;
import org.drip.numerical.estimation.R2ToR1Series;

/*
* -*- 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>FirstFrobeniusSeries</i> implements the Frobenius Series for the Cylindrical Bessel Function of the
* First Kind. The References are:
* First Kind. The References are:
*
* <br><br>
* <ul>
Expand All @@ -102,15 +110,27 @@
* Wikipedia (2019): Bessel Function https://en.wikipedia.org/wiki/Bessel_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/bessel/README.md">Ordered Bessel Function Variant Estimators</a></li>
* <li>Construct the R<sup>2</sup> To R<sup>1</sup> Bessel First Kind Frobenius Summation 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/ProductCore.md">Product Core Module</a></td></tr>
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</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/bessel/README.md">Ordered Bessel Function Variant Estimators</a></td></tr>
* </table>
*
* @author Lakshmi Krishnamurthy
*/

Expand All @@ -126,31 +146,19 @@ public class FirstFrobeniusSeries
* @return The R<sup>2</sup> To R<sup>1</sup> Bessel First Kind Frobenius Summation Series
*/

public static final org.drip.numerical.estimation.R2ToR1Series Summation (
final org.drip.function.definition.R1ToR1 gammaEstimator,
public static final R2ToR1Series Summation (
final R1ToR1 gammaEstimator,
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.R2ToR1Series (
new org.drip.specialfunction.bessel.FirstFrobeniusSeriesTerm (gammaEstimator),
false,
termWeightMap
);
}
catch (java.lang.Exception e)
{
return new R2ToR1Series (new FirstFrobeniusSeriesTerm (gammaEstimator), false, termWeightMap);
} 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.bessel;

import org.drip.function.definition.R1ToR1;
import org.drip.numerical.estimation.R2ToR1Series;
import org.drip.specialfunction.definition.BesselFirstKindEstimator;

/*
* -*- 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>FirstFrobeniusSeriesEstimator</i> implements the Frobenius Series Estimator for the Cylindrical Bessel
* Function of the First Kind. The References are:
* Function of the First Kind. The References are:
*
* <br><br>
* <ul>
Expand All @@ -102,60 +109,65 @@
* Wikipedia (2019): Bessel Function https://en.wikipedia.org/wiki/Bessel_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/bessel/README.md">Ordered Bessel Function Variant Estimators</a></li>
* <li>Construct a Standard Instance of Bessel <i>FirstFrobeniusSeriesEstimator</i></li>
* <li>Retrieve the Frobenius 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/ProductCore.md">Product Core Module</a></td></tr>
* <tr><td><b>Library</b></td> <td><a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</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/bessel/README.md">Ordered Bessel Function Variant Estimators</a></td></tr>
* </table>
*
* @author Lakshmi Krishnamurthy
*/

public class FirstFrobeniusSeriesEstimator extends
org.drip.specialfunction.definition.BesselFirstKindEstimator
public class FirstFrobeniusSeriesEstimator extends BesselFirstKindEstimator
{
private org.drip.numerical.estimation.R2ToR1Series _frobeniusSeries = null;
private R2ToR1Series _frobeniusSeries = null;

/**
* Construct a Standard Instance of Bessel FirstFrobeniusSeriesEstimator
* Construct a Standard Instance of Bessel <i>FirstFrobeniusSeriesEstimator</i>
*
* @param gammaEstimator The Gamma Estimator
* @param termCount Count of the Number of Terms
*
* @return The Standard Instance of Bessel FirstFrobeniusSeriesEstimator
* @return The Standard Instance of Bessel <i>FirstFrobeniusSeriesEstimator</i>
*/

public static final FirstFrobeniusSeriesEstimator Standard (
final org.drip.function.definition.R1ToR1 gammaEstimator,
final R1ToR1 gammaEstimator,
final int termCount)
{
try
{
try {
return new FirstFrobeniusSeriesEstimator (
org.drip.specialfunction.bessel.FirstFrobeniusSeries.Summation (
gammaEstimator,
termCount
)
FirstFrobeniusSeries.Summation (gammaEstimator, termCount)
);
}
catch (java.lang.Exception e)
{
} catch (Exception e) {
e.printStackTrace();
}

return null;
}

protected FirstFrobeniusSeriesEstimator (
final org.drip.numerical.estimation.R2ToR1Series frobeniusSeries)
throws java.lang.Exception
final R2ToR1Series frobeniusSeries)
throws Exception
{
if (null == (_frobeniusSeries = frobeniusSeries))
{
throw new java.lang.Exception ("FirstFrobeniusSeriesEstimator Constructor => Invalid Inputs");
if (null == (_frobeniusSeries = frobeniusSeries)) {
throw new Exception ("FirstFrobeniusSeriesEstimator Constructor => Invalid Inputs");
}
}

Expand All @@ -165,19 +177,16 @@ protected FirstFrobeniusSeriesEstimator (
* @return The Frobenius Series
*/

public org.drip.numerical.estimation.R2ToR1Series frobeniusSeries()
public R2ToR1Series frobeniusSeries()
{
return _frobeniusSeries;
}

@Override public double bigJ (
final double alpha,
final double z)
throws java.lang.Exception
throws Exception
{
return _frobeniusSeries.evaluate (
alpha,
z
);
return _frobeniusSeries.evaluate (alpha, z);
}
}
Loading

0 comments on commit c52c06d

Please sign in to comment.