1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! What a simulated venue holds against a short option.
use Decimal;
use AssetNameExchange;
use ;
/// How much quote a short put holds on the
/// [`SimulatedVenue`](crate::exchange::mock::SimulatedVenue), which takes only fully secured
/// shorts: a put written against cash set aside to buy the underlying at the strike if it is
/// assigned. See its `# How an option is accounted`.
///
/// Brokers differ on whether the premium the sale receives counts towards that cash. A short call
/// holds the underlying it would deliver, which the premium cannot pay for, so this setting does
/// not apply to it.
/// What a short option position holds as collateral on the
/// [`SimulatedVenue`](crate::exchange::mock::SimulatedVenue): `amount` of `asset`, kept out of that
/// asset's `free` balance and still in its `total`. A put holds quote, the strike it would pay; a
/// call holds base, the underlying it would deliver.