mirror of
https://github.com/corda/corda.git
synced 2024-12-19 13:08:04 +00:00
Rewrote some documentation about the simm demo. Moved a util function to the main utils file.
This commit is contained in:
parent
1a892886ac
commit
acaa9f82a5
@ -288,4 +288,9 @@ fun <T> Observable<T>.bufferUntilSubscribed(): Observable<T> {
|
|||||||
val subject = UnicastSubject.create<T>()
|
val subject = UnicastSubject.create<T>()
|
||||||
val subscription = subscribe(subject)
|
val subscription = subscribe(subject)
|
||||||
return subject.doOnUnsubscribe { subscription.unsubscribe() }
|
return subject.doOnUnsubscribe { subscription.unsubscribe() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Allows summing big decimals that are in iterable collections */
|
||||||
|
fun Iterable<BigDecimal>.sum(): BigDecimal {
|
||||||
|
return this.fold(BigDecimal.valueOf(0)) { a: BigDecimal, b: BigDecimal -> a + b }
|
||||||
|
}
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
package com.r3corda.core.math
|
|
||||||
|
|
||||||
import java.math.BigDecimal
|
|
||||||
|
|
||||||
fun Iterable<BigDecimal>.sum(): BigDecimal {
|
|
||||||
return this.fold(BigDecimal.valueOf(0)) { a: BigDecimal, b: BigDecimal -> a + b }
|
|
||||||
}
|
|
@ -7,12 +7,9 @@ agreement; featuring the integration of complex and industry proven third party
|
|||||||
SIMM Introduction
|
SIMM Introduction
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
SIMM is an acronym for "Standard Initial Margin Model".
|
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
|
||||||
Now this is a quite detailed and complicated subject, and I appeal to those of you who are know about this in depth to
|
paid such that, in the event of one of the counterparties suffering a credit event
|
||||||
be somewhat patient as I attempt to reduce it to the principal parts suitable for the demonstration. It is effectively
|
|
||||||
the calculation of what is known as 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),
|
(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
|
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
|
receiving party is a preventative measure in order to reduce the risk of a potentially catastrophic default domino
|
||||||
@ -53,7 +50,7 @@ Initial Margin Agreement Process
|
|||||||
- Agree on the results of these steps
|
- Agree on the results of these steps
|
||||||
- Calculate the initial margin
|
- Calculate the initial margin
|
||||||
- Agree on the calculation of the above with the other party
|
- Agree on the calculation of the above with the other party
|
||||||
- In practise, pay (or receive) this margin (omitted for the sake of complexity for this example)
|
- In practice, pay (or receive) this margin (omitted for the sake of complexity for this example)
|
||||||
|
|
||||||
|
|
||||||
Running the app
|
Running the app
|
||||||
|
@ -178,6 +178,8 @@ You should see some log lines scroll past, and within a few seconds the message
|
|||||||
SIMM and Portfolio Demo
|
SIMM and Portfolio Demo
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
.. note:: Read more about this demo at :doc:`initialmarginagreement`.
|
||||||
|
|
||||||
To run the demo run:
|
To run the demo run:
|
||||||
|
|
||||||
**Windows**
|
**Windows**
|
||||||
|
Loading…
Reference in New Issue
Block a user