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
45
46
47
48
49
50
51
52
53
54
55
56
/******************************************************************************
Author: Joaquín Béjar García
Email: jb@taunais.com
Date: 10/12/24
******************************************************************************/
//! # Delta Neutral Strategies Module
//!
//! This module provides tools for managing delta-neutral strategies in options trading.
//! It includes definitions for representing delta adjustments, calculating delta-neutrality,
//! and suggesting adjustments to achieve or maintain delta-neutrality.
//!
//! ## Key Components
//!
//! - **DeltaAdjustment**: Represents the adjustments (buying/selling options or the underlying asset)
//! required to move a strategy toward delta neutrality.
//! - **DeltaInfo**: Provides detailed information about the delta status of a strategy,
//! including the net delta, individual position deltas, and current neutrality status.
//! - **DeltaNeutrality Trait**: A trait for calculating net delta, checking delta-neutrality,
//! and suggesting adjustments to achieve delta-neutrality. It extends the `Greeks` trait for
//! options calculations.
//!
//! ## Extended Adjustment Features (Issue #187)
//!
//! - **AdjustmentAction**: Extended actions including adding new legs, rolling positions,
//! and using underlying shares for hedging.
//! - **AdjustmentConfig**: Configuration for adjustment behavior and constraints.
//! - **PortfolioGreeks**: Aggregated Greeks at portfolio level.
//! - **AdjustmentTarget**: Target Greeks for optimization.
//! - **AdjustmentOptimizer**: Optimizer for finding best adjustment plans.
//!
//! ## Overview
//!
//! Delta neutrality is a core concept in options trading, where traders aim to balance
//! long and short deltas to minimize directional risk. Achieving delta neutrality
//! often involves adjusting position sizes, adding new positions, or trading the underlying asset.
//!
//! The module provides:
//! - Tools to calculate net delta for multi-position strategies.
//! - Utilities to evaluate whether a strategy is delta-neutral within a given threshold.
//! - Suggestions for adjustments (buy/sell options or the underlying) to achieve neutrality.
//! - Extended adjustment capabilities for multi-leg strategies.
//! - Portfolio-level Greeks aggregation and optimization.
//!
pub use ;
pub use ;
pub use AdjustmentOptimizer;
pub use ;