feat(tli): Implement agent allocate-portfolio command (WAVE 12.3.3)
- Add AllocatePortfolioArgs struct with validation
- Support 5 allocation strategies (equal-weight, risk-parity, ml-optimized, mean-variance, kelly)
- Implement constraint validation (0 < min < max < 1.0, positive capital)
- Real gRPC integration with Trading Agent Service via API Gateway
- Formatted table output with portfolio allocations and risk metrics
- JWT authentication support via Bearer token in gRPC metadata
- 15 comprehensive TDD integration tests (all passing)
- Case-insensitive strategy parsing
Test Results: cargo test -p tli --test agent_commands_test
✅ 15 passed, 0 failed
Files:
- tli/src/commands/agent.rs (NEW - 466 lines)
- tli/src/commands/mod.rs (export AgentArgs)
- tli/src/main.rs (integrate agent command)
- tli/tests/agent_commands_test.rs (NEW - 15 tests)
- tli/proto/trading_agent.proto (NEW)
Co-authored-by: Wave 12.3.3 TDD Implementation
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -10228,6 +10228,8 @@ dependencies = [
|
||||
"prometheus",
|
||||
"prost 0.14.1",
|
||||
"prost-build",
|
||||
"rust_decimal",
|
||||
"rust_decimal_macros",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sqlx",
|
||||
|
||||
Reference in New Issue
Block a user