FX20.java

  1. package org.drip.sample.simmsettings;

  2. import org.drip.numerical.common.FormatUtil;
  3. import org.drip.service.env.EnvManager;
  4. import org.drip.simm.fx.FXSystemics20;

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

  8. /*!
  9.  * Copyright (C) 2018 Lakshmi Krishnamurthy
  10.  *
  11.  *  This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model
  12.  *      libraries targeting analysts and developers
  13.  *      https://lakshmidrip.github.io/DRIP/
  14.  *  
  15.  *  DRIP is composed of four main libraries:
  16.  *  
  17.  *  - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/
  18.  *  - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/
  19.  *  - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/
  20.  *  - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/
  21.  *
  22.  *  - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options,
  23.  *      Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA
  24.  *      Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV
  25.  *      Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM
  26.  *      Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics.
  27.  *
  28.  *  - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy
  29.  *      Incorporator, Holdings Constraint, and Transaction Costs.
  30.  *
  31.  *  - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality.
  32.  *
  33.  *  - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning.
  34.  *
  35.  *  Licensed under the Apache License, Version 2.0 (the "License");
  36.  *      you may not use this file except in compliance with the License.
  37.  *  
  38.  *  You may obtain a copy of the License at
  39.  *      http://www.apache.org/licenses/LICENSE-2.0
  40.  *  
  41.  *  Unless required by applicable law or agreed to in writing, software
  42.  *      distributed under the License is distributed on an "AS IS" BASIS,
  43.  *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  44.  *  
  45.  *  See the License for the specific language governing permissions and
  46.  *      limitations under the License.
  47.  */

  48. /**
  49.  * FX20 demonstrates the Extraction and Display of ISDA SIMM 2.0 FX Bucket Risk Weights, Correlations, and
  50.  *  Systemics. The References are:
  51.  *  
  52.  *  - Andersen, L. B. G., M. Pykhtin, and A. Sokol (2017): Credit Exposure in the Presence of Initial Margin,
  53.  *      https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2806156, eSSRN.
  54.  *  
  55.  *  - Albanese, C., S. Caenazzo, and O. Frankel (2017): Regression Sensitivities for Initial Margin
  56.  *      Calculations, https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2763488, eSSRN.
  57.  *  
  58.  *  - Anfuso, F., D. Aziz, P. Giltinan, and K. Loukopoulus (2017): A Sound Modeling and Back-testing
  59.  *      Framework for Forecasting Initial Margin Requirements,
  60.  *      https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2716279, eSSRN.
  61.  *  
  62.  *  - Caspers, P., P. Giltinan, R. Lichters, and N. Nowaczyk (2017): Forecasting Initial Margin Requirements
  63.  *      - A Model Evaluation https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2911167, eSSRN.
  64.  *  
  65.  *  - International Swaps and Derivatives Association (2017): SIMM v2.0 Methodology,
  66.  *      https://www.isda.org/a/oFiDE/isda-simm-v2.pdf.
  67.  *
  68.  * @author Lakshmi Krishnamurthy
  69.  */

  70. public class FX20
  71. {

  72.     private static final void Systemics()
  73.     {
  74.         System.out.println ("\t||----------------------------------------------------------------||");

  75.         System.out.println ("\t||                      2.0 FX SYSTEMICS                          ||");

  76.         System.out.println ("\t||----------------------------------------------------------------||");

  77.         System.out.println (
  78.             "\t|| Risk Weight                                         => " +
  79.             FormatUtil.FormatDouble (
  80.                 FXSystemics20.DELTA_RISK_WEIGHT, 3, 2, 1.
  81.             ) + " ||"
  82.         );

  83.         System.out.println (
  84.             "\t|| Historical Volatility Ratio                         => " +
  85.             FormatUtil.FormatDouble (
  86.                 FXSystemics20.HISTORICAL_VOLATILITY_RATIO, 3, 2, 1.
  87.             ) + " ||"
  88.         );

  89.         System.out.println (
  90.             "\t|| Vega Risk Weight                                    => " +
  91.             FormatUtil.FormatDouble (
  92.                 FXSystemics20.VEGA_RISK_WEIGHT, 3, 2, 1.
  93.             ) + " ||"
  94.         );

  95.         System.out.println (
  96.             "\t|| Correlation                                         => " +
  97.             FormatUtil.FormatDouble (
  98.                 FXSystemics20.CORRELATION, 3, 2, 1.
  99.             ) + " ||"
  100.         );

  101.         System.out.println ("\t||----------------------------------------------------------------||");

  102.         System.out.println();
  103.     }

  104.     public static final void main (
  105.         final String[] args)
  106.         throws Exception
  107.     {
  108.         EnvManager.InitEnv ("");

  109.         Systemics();

  110.         EnvManager.TerminateEnv();
  111.     }
  112. }