mirror of
https://github.com/corda/corda.git
synced 2024-12-22 14:22:28 +00:00
329 lines
15 KiB
HTML
329 lines
15 KiB
HTML
|
|
|
|
<!DOCTYPE html>
|
|
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
|
|
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>Initial Margin Agreements — R3 Corda latest documentation</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="top" title="R3 Corda latest documentation" href="index.html"/>
|
|
<link rel="next" title="Client RPC" href="clientrpc.html"/>
|
|
<link rel="prev" title="Interest Rate Swaps" href="contract-irs.html"/>
|
|
|
|
|
|
<script src="_static/js/modernizr.min.js"></script>
|
|
|
|
</head>
|
|
|
|
<body class="wy-body-for-nav" role="document">
|
|
|
|
<div class="wy-grid-for-nav">
|
|
|
|
|
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
|
<div class="wy-side-scroll">
|
|
<div class="wy-side-nav-search">
|
|
|
|
|
|
|
|
|
|
<a href="index.html" class="icon icon-home"> R3 Corda
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
<div class="version">
|
|
latest
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div role="search">
|
|
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
|
<input type="text" name="q" placeholder="Search docs" />
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
<input type="hidden" name="area" value="default" />
|
|
</form>
|
|
</div>
|
|
|
|
|
|
<br>
|
|
<a href="api/index.html">API reference</a>
|
|
|
|
</div>
|
|
|
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
|
|
|
|
|
|
|
<p class="caption"><span class="caption-text">Overview</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="inthebox.html">What’s included?</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="getting-set-up.html">Getting set up</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="data-model.html">Data model</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="transaction-data-types.html">Data types</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="merkle-trees.html">Transaction Tear-offs</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="consensus.html">Consensus model</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="messaging.html">Networking and messaging</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="persistence.html">Persistence</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="creating-a-cordapp.html">Creating a Cordapp</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="creating-a-cordapp.html#gradle-plugins-for-cordapps">Gradle Plugins for Cordapps</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="running-the-demos.html">Running the demos</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="node-administration.html">Node administration</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="corda-configuration-files.html">The Corda Configuration File</a></li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Tutorials</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="where-to-start.html">Where to start</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="tutorial-contract.html">Writing a contract</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="tutorial-contract-clauses.html">Writing a contract using clauses</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="tutorial-test-dsl.html">Writing a contract test</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="tutorial-clientrpc-api.html">Client RPC API Tutorial</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="protocol-state-machines.html">Protocol state machines</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="oracles.html">Writing oracle services</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="tutorial-attachments.html">Using attachments</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="event-scheduling.html">Event scheduling</a></li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Contracts</span></p>
|
|
<ul class="current">
|
|
<li class="toctree-l1"><a class="reference internal" href="contract-catalogue.html">Contract catalogue</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="contract-irs.html">Interest Rate Swaps</a></li>
|
|
<li class="toctree-l1 current"><a class="current reference internal" href="#">Initial Margin Agreements</a><ul>
|
|
<li class="toctree-l2"><a class="reference internal" href="#simm-introduction">SIMM Introduction</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#process-steps">Process steps</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#running-the-app">Running the app</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Node API</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="clientrpc.html">Client RPC</a></li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Appendix</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="loadtesting.html">Load testing</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="secure-coding-guidelines.html">Secure coding guidelines</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="release-process.html">Release process</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="release-process.html#steps-to-cut-a-release">Steps to cut a release</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="release-notes.html">Release notes</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="network-simulator.html">Network Simulator</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="node-explorer.html">Node Explorer</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="codestyle.html">Code style guide</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="building-the-docs.html">Building the documentation</a></li>
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
|
|
|
|
|
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
|
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
|
<a href="index.html">R3 Corda</a>
|
|
</nav>
|
|
|
|
|
|
|
|
<div class="wy-nav-content">
|
|
<div class="rst-content">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div role="navigation" aria-label="breadcrumbs navigation">
|
|
<ul class="wy-breadcrumbs">
|
|
<li><a href="index.html">Docs</a> »</li>
|
|
|
|
<li>Initial Margin Agreements</li>
|
|
<li class="wy-breadcrumbs-aside">
|
|
|
|
|
|
<a href="_sources/initialmarginagreement.txt" rel="nofollow"> View page source</a>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
<hr/>
|
|
</div>
|
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
<div itemprop="articleBody">
|
|
|
|
<div class="section" id="initial-margin-agreements">
|
|
<h1>Initial Margin Agreements<a class="headerlink" href="#initial-margin-agreements" title="Permalink to this headline">¶</a></h1>
|
|
<p>This app is a demonstration of how Corda can be used for the real world requirement of initial margin calculation and
|
|
agreement; featuring the integration of complex and industry proven third party libraries into Corda nodes.</p>
|
|
<div class="section" id="simm-introduction">
|
|
<h2>SIMM Introduction<a class="headerlink" href="#simm-introduction" title="Permalink to this headline">¶</a></h2>
|
|
<p>SIMM is an acronym for “Standard Initial Margin Model”. It is effectively the calculation of a “margin” that is paid
|
|
by one party to another when they agree a trade on certain types of transaction. This margin is
|
|
paid such that, in the event of one of the counterparties suffering a credit event
|
|
(a financial term and a polite way to say defaulting, not paying the debts that are due, or potentially even bankruptcy),
|
|
then the party that is owed any sum already has some of the amount that it should have been paid. This payment to the
|
|
receiving party is a preventative measure in order to reduce the risk of a potentially catastrophic default domino
|
|
effect that caused the <a class="reference external" href="https://en.wikipedia.org/wiki/Financial_crisis_of_2007%E2%80%932008">Great Financial Crisis</a>,
|
|
as it means that they can be assured that if they need to pay another party, they will have a proportion of the funds
|
|
that they have been relying on.</p>
|
|
<p>To enact this, in September 2016, the ISDA committee - with full backing from various governing bodies -
|
|
<a class="reference external" href="http://www2.isda.org/news/isda-simm-deployed-today-new-industry-standard-for-calculating-initial-margin-widely-adopted-by-market-participants">issued a ruling on what is known as the ISDA SIMM ™ model</a>,
|
|
a way of fairly and consistently calculating this margin. Any parties wishing to trade a financial product that is
|
|
covered under this ruling would, independently, use this model and calculate their margin payment requirement,
|
|
agree it with their trading counterparty and then pay (or receive, depending on the results of this calculation)
|
|
this amount. In the case of disagreement that is not resolved in a timely fashion, this payment would increase
|
|
and so therefore it is in the parties interest to reach agreement in a short as time frame as possible.</p>
|
|
<p>To be more accurate, the SIMM calculation is not performed on just one trade - it is calculated on an aggregate of
|
|
intermediary values (which in this model are sensitivities to risk factors) from a portfolio of trades; therefore
|
|
the input to a SIMM is actually this data, not the individual trades itself.</p>
|
|
<p>Also note that implementations of the SIMM are actually protected and subject to license restrictions by ISDA
|
|
(this is due to the model itself being protected). We were fortunate enough to technically partner with
|
|
<a class="reference external" href="http://www.opengamma.com">OpenGamma</a> who allowed us to demonstrate the SIMM process using their proprietary model.
|
|
In the source code released, we have replaced their analytics engine with very simple stub functions that allow
|
|
the process to run and can easily be swapped out in place for their real libraries.</p>
|
|
</div>
|
|
<div class="section" id="process-steps">
|
|
<h2>Process steps<a class="headerlink" href="#process-steps" title="Permalink to this headline">¶</a></h2>
|
|
<dl class="docutils">
|
|
<dt>Preliminaries</dt>
|
|
<dd><ul class="first simple">
|
|
<li>Ensure that there are a number of live trades with another party financial products that are covered under the</li>
|
|
</ul>
|
|
<blockquote class="last">
|
|
<div>ISDA SIMM agreement (if none, then use the demo to enter some simple trades as described below).</div></blockquote>
|
|
</dd>
|
|
<dt>Initial Margin Agreement Process</dt>
|
|
<dd><ul class="first last simple">
|
|
<li>Agree that one will be performing the margining calculation against a portfolio of trades with another party, and agree the trades in that portfolio. In practice, one node will start the protocol but it does not matter which node does.</li>
|
|
<li>Individually (at the node level), identify the data (static, reference etc) one will need in order to be able to calculate the metrics on those trades</li>
|
|
<li>Confirm with the other counterparty the dataset from the above set</li>
|
|
<li>Calculate any intermediary steps and values needed for the margin calculation (ie sensitivities to risk factors)</li>
|
|
<li>Agree on the results of these steps</li>
|
|
<li>Calculate the initial margin</li>
|
|
<li>Agree on the calculation of the above with the other party</li>
|
|
<li>In practice, pay (or receive) this margin (omitted for the sake of complexity for this example)</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<div class="section" id="running-the-app">
|
|
<h2>Running the app<a class="headerlink" href="#running-the-app" title="Permalink to this headline">¶</a></h2>
|
|
<p>The demonstration can be run in two ways - via IntelliJ (which will allow you to add breakpoints, debug, etc), or via gradle and the command line.</p>
|
|
<p>Run with IntelliJ:</p>
|
|
<div class="highlight-kotlin"><div class="highlight"><pre><span></span>1. Open the `cordapp-samples` project with IntelliJ
|
|
2. Run the shared run configuration "SIMM Valuation Demo"
|
|
3. Browse to http://localhost:10005/web/simmvaluationdemo
|
|
</pre></div>
|
|
</div>
|
|
<p>Run via CLI:</p>
|
|
<div class="highlight-kotlin"><div class="highlight"><pre><span></span>1. Navigate to the `cordapp-samples` directory in your shell
|
|
2. Run the gradle target `deployNodes` (ie; ./gradlew deployNodes for Unix or gradlew.bat on Windows)
|
|
1. Unix: `cd simm-valuation-demo/build/nodes && ./runnodes`.
|
|
2. Windows: `cd simm-valuation-demo/build/nodes & runnodes.bat`
|
|
4. Browse to http://localhost:10005/web/simmvaluationdemo
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<footer>
|
|
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
|
|
|
<a href="clientrpc.html" class="btn btn-neutral float-right" title="Client RPC" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
|
|
|
|
|
|
<a href="contract-irs.html" class="btn btn-neutral" title="Interest Rate Swaps" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
|
|
|
</div>
|
|
|
|
|
|
<hr/>
|
|
|
|
<div role="contentinfo">
|
|
<p>
|
|
© Copyright 2016, Distributed Ledger Group, LLC.
|
|
|
|
</p>
|
|
</div>
|
|
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
var DOCUMENTATION_OPTIONS = {
|
|
URL_ROOT:'./',
|
|
VERSION:'latest',
|
|
COLLAPSE_INDEX:false,
|
|
FILE_SUFFIX:'.html',
|
|
HAS_SOURCE: true
|
|
};
|
|
</script>
|
|
<script type="text/javascript" src="_static/jquery.js"></script>
|
|
<script type="text/javascript" src="_static/underscore.js"></script>
|
|
<script type="text/javascript" src="_static/doctools.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript" src="_static/js/theme.js"></script>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
jQuery(function () {
|
|
SphinxRtdTheme.StickyNav.enable();
|
|
});
|
|
</script>
|
|
|
|
|
|
</body>
|
|
</html> |