feat: Allow stop prices (gain/loss) in trading agent decisions#1
Merged
feat: Allow stop prices (gain/loss) in trading agent decisions#1
Conversation
This PR implements robust management for Stop Gain/Loss prices, ensuring these critical protective limits are **maintained and consistently applied** across trading sessions and subsequent LLM decisions. * **LLM Definition:** LLM response extended to include new Stop Gain/Loss price fields. * **Persistent Storage:** Defined stop prices are stored in session memory and persisted via database snapshot. * **Session Continuity:** Loads persisted stop prices when resuming a session, restoring trading strategy limits. * **Informed Decisions:** Existing stop prices are fed back into the LLM context to inform and assist subsequent trading actions.
- Add multi-stage Dockerfile.cloud (bun SPA + Python backend) - Serve React SPA from FastAPI via FRONTEND_BUILD_DIR env var - Add docker-compose.yml and vm-setup.sh for GCE VM - Add GitHub Actions workflow deploying via SSH to 34.142.253.116 - Remove Cloud Run / OCI configs Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
biome.json,agent.tsconstants)Changes
trading/models.pystop_gain_priceandstop_loss_pricefields to position modelportfolio/interfaces.py&in_memory.pycoordinator.pyruntime.pycomposer.py/system_prompt.pyfrontend/StrategyAgentconstantTest plan
make test(Python unit tests pass)deploy.yml→ Docker image built → VM restarted →GET /api/v1/healthzreturns 200🤖 Generated with Claude Code