-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Mid Price Peg Scheme Shell (1, 2) - OMS Benchmark Peg Scheme Side (3, 4) - OMS Benchmark Peg Scheme Ticker (5, 6) - OMS Benchmark Peg Scheme Constructor (7, 8, 9) - Fixed Peg Price Scheme Generator (10, 11, 12) - Mid Peg Price Scheme #1 (13, 14) - Retrieve Set of Montage Tickers (15, 16) - Cross Venue Montage Digest Ticker (17, 18, 19) - Retrieve Ticker Montage L1 Manager (20, 21, 22) - Mid Price Peg Scheme Limit (23, 24, 25) - Market Making Peg Scheme Shell (26, 27) - Market Making Peg Scheme #1 (28, 29, 30) - Peg Scheme Abstract To Interface (31) - Fixed Price Peg Scheme Extension (32, 33) - Mid Peg Price Scheme #2 (34, 35, 36) - Market Making Peg Scheme #2 (37) - Crossing Market Making Peg Scheme #1 (38, 39) - Crossing Market Making Peg Scheme #2 (40, 41) - Montage L1 Manager Side Book (42) - Crossing Market Making Peg Scheme #3 (43, 44, 45) - Entity Equity Label Tick Size (46, 47, 48) - Entity Equity Label Default Size (49) - Entity Equity Label Tick Constructor (50, 51, 52) - Entity Equity Label Ticker #1 (53, 54) - Entity Equity Label Ticker #2 (55, 56) - Aggressive Market Making Peg Scheme #1 (57, 58, 59) - Aggressive Market Making Peg Scheme #2 (60) Bug Fixes/Re-organization: Samples: IdeaDRIP:
- Loading branch information
Showing
11 changed files
with
800 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
|
||
Features: | ||
|
||
- Mid Price Peg Scheme Shell (1, 2) | ||
- OMS Benchmark Peg Scheme Side (3, 4) | ||
- OMS Benchmark Peg Scheme Ticker (5, 6) | ||
- OMS Benchmark Peg Scheme Constructor (7, 8, 9) | ||
- Fixed Peg Price Scheme Generator (10, 11, 12) | ||
- Mid Peg Price Scheme #1 (13, 14) | ||
- Retrieve Set of Montage Tickers (15, 16) | ||
- Cross Venue Montage Digest Ticker (17, 18, 19) | ||
- Retrieve Ticker Montage L1 Manager (20, 21, 22) | ||
- Mid Price Peg Scheme Limit (23, 24, 25) | ||
- Market Making Peg Scheme Shell (26, 27) | ||
- Market Making Peg Scheme #1 (28, 29, 30) | ||
- Peg Scheme Abstract To Interface (31) | ||
- Fixed Price Peg Scheme Extension (32, 33) | ||
- Mid Peg Price Scheme #2 (34, 35, 36) | ||
- Market Making Peg Scheme #2 (37) | ||
- Crossing Market Making Peg Scheme #1 (38, 39) | ||
- Crossing Market Making Peg Scheme #2 (40, 41) | ||
- Montage L1 Manager Side Book (42) | ||
- Crossing Market Making Peg Scheme #3 (43, 44, 45) | ||
- Entity Equity Label Tick Size (46, 47, 48) | ||
- Entity Equity Label Default Size (49) | ||
- Entity Equity Label Tick Constructor (50, 51, 52) | ||
- Entity Equity Label Ticker #1 (53, 54) | ||
- Entity Equity Label Ticker #2 (55, 56) | ||
- Aggressive Market Making Peg Scheme #1 (57, 58, 59) | ||
- Aggressive Market Making Peg Scheme #2 (60) | ||
|
||
|
||
Bug Fixes/Re-organization: | ||
|
||
Samples: | ||
|
||
IdeaDRIP: |
Binary file not shown.
121 changes: 121 additions & 0 deletions
121
src/main/java/org/drip/oms/benchmark/AggressiveMarketMakingPegScheme.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
|
||
package org.drip.oms.benchmark; | ||
|
||
import org.drip.state.identifier.EntityEquityLabel; | ||
|
||
/* | ||
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- | ||
*/ | ||
|
||
/*! | ||
* Copyright (C) 2024 Lakshmi Krishnamurthy | ||
* | ||
* This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics, | ||
* asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment | ||
* analytics, and portfolio construction analytics within and across fixed income, credit, commodity, | ||
* equity, FX, and structured products. It also includes auxiliary libraries for algorithm support, | ||
* numerical analysis, numerical optimization, spline builder, model validation, statistical learning, | ||
* graph builder/navigator, and computational support. | ||
* | ||
* https://lakshmidrip.github.io/DROP/ | ||
* | ||
* DROP is composed of three modules: | ||
* | ||
* - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/ | ||
* - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/ | ||
* - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/ | ||
* | ||
* DROP Product Core implements libraries for the following: | ||
* - Fixed Income Analytics | ||
* - Loan Analytics | ||
* - Transaction Cost Analytics | ||
* | ||
* DROP Portfolio Core implements libraries for the following: | ||
* - Asset Allocation Analytics | ||
* - Asset Liability Management Analytics | ||
* - Capital Estimation Analytics | ||
* - Exposure Analytics | ||
* - Margin Analytics | ||
* - XVA Analytics | ||
* | ||
* DROP Computational Core implements libraries for the following: | ||
* - Algorithm Support | ||
* - Computation Support | ||
* - Function Analysis | ||
* - Graph Algorithm | ||
* - Model Validation | ||
* - Numerical Analysis | ||
* - Numerical Optimizer | ||
* - Spline Builder | ||
* - Statistical Learning | ||
* | ||
* Documentation for DROP is Spread Over: | ||
* | ||
* - Main => https://lakshmidrip.github.io/DROP/ | ||
* - Wiki => https://github.com/lakshmiDRIP/DROP/wiki | ||
* - GitHub => https://github.com/lakshmiDRIP/DROP | ||
* - Repo Layout Taxonomy => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md | ||
* - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html | ||
* - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal | ||
* - Release Versions => https://lakshmidrip.github.io/DROP/version.html | ||
* - Community Credits => https://lakshmidrip.github.io/DROP/credits.html | ||
* - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* <i>AggressiveMarketMakingPegScheme</i> implements the Aggressively Jumping Market Making Scheme for Peg | ||
* Orders. The References are: | ||
* | ||
* <br><br> | ||
* <ul> | ||
* <li> | ||
* Berkowitz, S. A., D. E. Logue, and E. A. J. Noser (1988): The Total Cost of Transactions on the | ||
* NYSE <i>Journal of Finance</i> <b>43 (1)</b> 97-112 | ||
* </li> | ||
* <li> | ||
* Cont, R., and A. Kukanov (2017): Optimal Order Placement in Limit Order Markets <i>Quantitative | ||
* Finance</i> <b>17 (1)</b> 21-39 | ||
* </li> | ||
* <li> | ||
* Vassilis, P. (2005a): A Realistic Model of Market Liquidity and Depth <i>Journal of Futures | ||
* Markets</i> <b>25 (5)</b> 443-464 | ||
* </li> | ||
* <li> | ||
* Vassilis, P. (2005b): Slow and Fast Markets <i>Journal of Economics and Business</i> <b>57 | ||
* (6)</b> 576-593 | ||
* </li> | ||
* <li> | ||
* Weiss, D. (2006): <i>After the Trade is Made: Processing Securities Transactions</i> <b>Portfolio | ||
* Publishing</b> London UK | ||
* </li> | ||
* </ul> | ||
* | ||
* <br><br> | ||
* <ul> | ||
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></li> | ||
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/TransactionCostAnalyticsLibrary.md">Transaction Cost Analytics</a></li> | ||
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/oms/README.md">R<sup>d</sup> Order Specification, Handling, and Management</a></li> | ||
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/oms/benchmark/README.md">Benchmark/Tie/Peg Price Thresholds</a></li> | ||
* </ul> | ||
* | ||
* @author Lakshmi Krishnamurthy | ||
*/ | ||
|
||
public class AggressiveMarketMakingPegScheme | ||
{ | ||
private EntityEquityLabel _entityEquityLabel = null; | ||
|
||
} |
200 changes: 200 additions & 0 deletions
200
src/main/java/org/drip/oms/benchmark/CrossingMarketMakingPegScheme.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
|
||
package org.drip.oms.benchmark; | ||
|
||
import org.drip.oms.depth.MontageL1Manager; | ||
import org.drip.oms.exchange.CrossVenueMontageDigest; | ||
import org.drip.oms.transaction.OrderBlock; | ||
import org.drip.oms.transaction.Side; | ||
|
||
/* | ||
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- | ||
*/ | ||
|
||
/*! | ||
* Copyright (C) 2024 Lakshmi Krishnamurthy | ||
* | ||
* This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics, | ||
* asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment | ||
* analytics, and portfolio construction analytics within and across fixed income, credit, commodity, | ||
* equity, FX, and structured products. It also includes auxiliary libraries for algorithm support, | ||
* numerical analysis, numerical optimization, spline builder, model validation, statistical learning, | ||
* graph builder/navigator, and computational support. | ||
* | ||
* https://lakshmidrip.github.io/DROP/ | ||
* | ||
* DROP is composed of three modules: | ||
* | ||
* - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/ | ||
* - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/ | ||
* - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/ | ||
* | ||
* DROP Product Core implements libraries for the following: | ||
* - Fixed Income Analytics | ||
* - Loan Analytics | ||
* - Transaction Cost Analytics | ||
* | ||
* DROP Portfolio Core implements libraries for the following: | ||
* - Asset Allocation Analytics | ||
* - Asset Liability Management Analytics | ||
* - Capital Estimation Analytics | ||
* - Exposure Analytics | ||
* - Margin Analytics | ||
* - XVA Analytics | ||
* | ||
* DROP Computational Core implements libraries for the following: | ||
* - Algorithm Support | ||
* - Computation Support | ||
* - Function Analysis | ||
* - Graph Algorithm | ||
* - Model Validation | ||
* - Numerical Analysis | ||
* - Numerical Optimizer | ||
* - Spline Builder | ||
* - Statistical Learning | ||
* | ||
* Documentation for DROP is Spread Over: | ||
* | ||
* - Main => https://lakshmidrip.github.io/DROP/ | ||
* - Wiki => https://github.com/lakshmiDRIP/DROP/wiki | ||
* - GitHub => https://github.com/lakshmiDRIP/DROP | ||
* - Repo Layout Taxonomy => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md | ||
* - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html | ||
* - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal | ||
* - Release Versions => https://lakshmidrip.github.io/DROP/version.html | ||
* - Community Credits => https://lakshmidrip.github.io/DROP/credits.html | ||
* - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* <i>CrossingMarketMakingPegScheme</i> implements the Crosser Market Making Scheme for Peg Orders. The | ||
* References are: | ||
* | ||
* <br><br> | ||
* <ul> | ||
* <li> | ||
* Berkowitz, S. A., D. E. Logue, and E. A. J. Noser (1988): The Total Cost of Transactions on the | ||
* NYSE <i>Journal of Finance</i> <b>43 (1)</b> 97-112 | ||
* </li> | ||
* <li> | ||
* Cont, R., and A. Kukanov (2017): Optimal Order Placement in Limit Order Markets <i>Quantitative | ||
* Finance</i> <b>17 (1)</b> 21-39 | ||
* </li> | ||
* <li> | ||
* Vassilis, P. (2005a): A Realistic Model of Market Liquidity and Depth <i>Journal of Futures | ||
* Markets</i> <b>25 (5)</b> 443-464 | ||
* </li> | ||
* <li> | ||
* Vassilis, P. (2005b): Slow and Fast Markets <i>Journal of Economics and Business</i> <b>57 | ||
* (6)</b> 576-593 | ||
* </li> | ||
* <li> | ||
* Weiss, D. (2006): <i>After the Trade is Made: Processing Securities Transactions</i> <b>Portfolio | ||
* Publishing</b> London UK | ||
* </li> | ||
* </ul> | ||
* | ||
* <br><br> | ||
* <ul> | ||
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></li> | ||
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/TransactionCostAnalyticsLibrary.md">Transaction Cost Analytics</a></li> | ||
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/oms/README.md">R<sup>d</sup> Order Specification, Handling, and Management</a></li> | ||
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/oms/benchmark/README.md">Benchmark/Tie/Peg Price Thresholds</a></li> | ||
* </ul> | ||
* | ||
* @author Lakshmi Krishnamurthy | ||
*/ | ||
|
||
public class CrossingMarketMakingPegScheme | ||
extends MarketMakingPegScheme | ||
{ | ||
|
||
/** | ||
* <i>CrossingMarketMakingPegScheme</i> Constructor | ||
* | ||
* @param ticker Ticker | ||
* @param side Side | ||
* | ||
* @throws Exception Thrown if the Inputs are Invalid | ||
*/ | ||
|
||
public CrossingMarketMakingPegScheme ( | ||
final String ticker, | ||
final Side side) | ||
throws Exception | ||
{ | ||
super ( | ||
ticker, | ||
side | ||
); | ||
} | ||
|
||
@Override public double limitPrice ( | ||
final CrossVenueMontageDigest crossVenueMontageDigest) | ||
throws Exception | ||
{ | ||
if (null == crossVenueMontageDigest) | ||
{ | ||
throw new Exception ( | ||
"MidPricePegScheme::limitPrice => Invalid Inputs" | ||
); | ||
} | ||
|
||
MontageL1Manager montageL1Manager = crossVenueMontageDigest.retrieveTickerMontageL1Manager ( | ||
ticker() | ||
); | ||
|
||
if (null == montageL1Manager) | ||
{ | ||
throw new Exception ( | ||
"MidPricePegScheme::limitPrice => Invalid L1 Montage Manager" | ||
); | ||
} | ||
|
||
char buySell = side().buySell(); | ||
|
||
if (Side.BUY == buySell) | ||
{ | ||
OrderBlock askNBBOBlock = montageL1Manager.askNBBOBlock(); | ||
|
||
if (null == askNBBOBlock) | ||
{ | ||
throw new Exception ( | ||
"MidPricePegScheme::limitPrice => Invalid Ask NBBO Block" | ||
); | ||
} | ||
|
||
return askNBBOBlock.price(); | ||
} | ||
|
||
if (Side.SELL == buySell) | ||
{ | ||
OrderBlock bidNBBOBlock = montageL1Manager.bidNBBOBlock(); | ||
|
||
if (null == bidNBBOBlock) | ||
{ | ||
throw new Exception ( | ||
"MidPricePegScheme::limitPrice => Invalid Bid NBBO Block" | ||
); | ||
} | ||
|
||
return bidNBBOBlock.price(); | ||
} | ||
|
||
throw new Exception ( | ||
"MidPricePegScheme::limitPrice => Cannot compute Limit Price" | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.