ores.trading.structure_template
Table of Contents
Reference data table defining the shapes a structure of a given kind may take. A template states which roles its legs may play and how many legs each role holds, so that a strategy is a mould rather than a convention.
The roles themselves are the child table, because a template has several and each carries its own leg counts.
Examples: 'Straddle', 'RiskReversal', 'Butterfly', 'CallableSwap'.
1. Flags
2. Columns
2.1. code
The template code.
Examples: 'Straddle', 'Butterfly'.
std::string("Straddle")
2.2. description
What the template shapes, and which product family it belongs to.
std::string(faker::lorem::sentence())
2.3. kind
The kind of structure the template shapes. A strategy template shapes a strategy, and a typed template shapes a typed product.
std::string("Strategy")
3. SQL
3.1. Flags
3.2. Extra drops
drop function if exists ores_trading_validate_structure_template_fn;
4. Foreign keys
4.1. kind
The kind catalogue is system reference data.
5. C++
5.1. Flags
5.2. Repository
5.3. Domain includes
#include <string>
5.4. Conventions
5.5. Table display
| column | header |
|---|---|
| code | Code |
| description | Description |
| kind | Kind |
| modified_by | Modified By |
| version | Version |
5.6. Custom repository methods
6. See also
- ores.trading — component group overview.
- Trade Structures and Deal Composition — the ladder and the rules a template encodes.