Follow this worked strategy
I connected VS Code Copilot to the NexusTrade trading API and had it research a SPY bear put spread, build the spread rules, and inspect the completed 2024 test. The agent operated this workflow through NexusTrade's MCP server; it did not build the integration. The spread lost 13.34% against full-capital SPY at 25.30%, including a recorded trade that lost $487.82. This is a development test on examined dates. Judge frozen rules on dates you have not used yet.
Follow the full journey
Connect VS Code Copilot
Add the NexusTrade server
{
"servers": {
"nexustrade": {
"type": "http",
"url": "https://nexustrade.io/api/mcp"
}
}
}Scroll horizontally to read the full command, or copy it.
Open the Command Palette with Cmd+Shift+P on macOS or Ctrl+Shift+P on Windows/Linux. Run MCP: Add Server and follow the remote HTTP server flow with the URL shown above and name nexustrade. Choose workspace .mcp.json or Copilot Global for a new portable configuration.
Sign in to your NexusTrade account
Alternatively, run MCP: Open User Configuration and merge the servers configuration shown above into that VS Code profile file. It is the VS Code profile format, rather than the portable mcpServers format. Run MCP: List Servers, select NexusTrade and start it. Complete the account sign-in requested by the connection, then inspect its tools in chat. Workspace trust and server enablement can affect availability.
The result identifies Apple's company filing, filing date and source URL. The connection check makes no account changes.
Inspect the request
Research SPY and the put spread
Read the SPY underlying, option expiry and strike selectors together. The long and short put legs use the same expiry; inspect the actual selected contracts before reviewing the debit and collateral.
A dated brief names the instrument, original sources and assumptions that matter to this strategy.
Inspect the request

Build the SPY put spread
Enter when SPY is below its 50-day average and no matching option position is open. Review both legs and the signal and 14-DTE exits before saving.
- Entry
- SPY < SMA50; matching position count = 0
- Legs
- Buy ATM put; sell put at -5% strike
- Expiry
- Nearest available expiry 30 to 45 days away; ratios 1:1
- Sizing
- One strategy unit; collateral and liquidity apply
- Exit
- SPY >= SMA50 or at most 14 DTE
The preview shows three rules, both contract selectors and the exact sizing method.
Inspect the request
- Bear put spread 2024-12-31, 21:00:00 UTC
- 8,665.52
- Full-capital SPY buy and hold 2024-12-31, 21:00:00 UTC
- 12,530.29
Inspect the completed 2024 spread test
Compare the spread curve with full-capital SPY over the same year. Option contract selection and execution assumptions belong to this result.
- Return
- -13.34%
- SPY buy and hold
- 25.30%
- Max drawdown
- 23.74%
- Closed option legs
- 16
- Commissions
- $22.10
The bear put spread returned -13.34% in this completed historical simulation.
Inspect the request
Observe SPY bear put spread in paper trading
Keep the selectors and sizing fixed in a separate paper portfolio. Inspect the long and short legs as one spread, with matching expiries and the exits defined above.
- Inspect before accepting an order
- The selected SPY strikes, matching expiry, contract quantities, debit, collateral, pending order legs and 14-DTE exit.
Your paper portfolio has its own ID, start date, schedule and dated history. These forward observations begin with your own run.
Inspect the request
Review SPY bear put spread for live deployment
Review the spread in the target account only after confirming that its broker connection supports the required multi-leg option actions and your account has the necessary options permissions.
Open the live deployment walkthrough- Account and instrument review
- SPY multi-leg options support, account permission level, debit and collateral, quote availability, both leg quantities and exit support.
The review identifies the target account, supported instruments, rule changes and approval settings before confirmation.
Inspect the request
Follow the VS Code Copilot session
{
"servers": {
"nexustrade": {
"type": "http",
"url": "https://nexustrade.io/api/mcp"
}
}
}Scroll horizontally to read the full command, or copy it.
This guide runs on NexusTrade's MCP server. VS Code Copilot operated the trading workflow below, from connection to the live review. The agent's role here is operating the workflow through that server.
The table names the tool call, the approval checkpoint, and the artifact to keep at each stage. Placeholders such as a returned draft ID stand for values your own run returns. This page records no IDs from anyone else's run.
The recorded anchor is the completed 2024 spread test below, including the recorded trade that lost $487.82 and the largest decline in the exported history.
Show the table · 6 rows, 4 columns
Scroll sideways to compare all columns. Select a heading to sort.
| Connect VS Code Copilot | sec_edgar list_filings for AAPL with limit 1 | Public read only. No portfolios, ingested filings, or changes. | Filing company, form, date, and source URL |
| Research the spread | Instrument and option sources for the SPY bear put spread | Read-only step. Payoff stays separate from mark-to-market history. | Dated spread brief |
| Draft the rules | build_portfolio preview, then one create_portfolio | Approve the rules before saving. Stop before paid tests. | Returned draft ID with a readback |
| Test history | 2024 backtest at $10,000 with an SPY baseline and modeled commissions | Show the request and estimated cost before submission. | History, contracts, collateral, and quote timing |
| Trade on paper | Separate paper-only deployment at $10,000 | Show the plan. Verify the portfolio is paper. | Running paper ID and dated history |
| Review live | Live deployment review against the actual account | Live trading stays unchanged until explicit confirmation. | Reviewed plan, or a stop report when unsupported |
No matching rows. Clear the filter to see all records.
Where VS Code Copilot stops for approval
Each consequential action in this guide waits at an approval gate. The agent previews first and acts only after explicit approval.
The rules preview returns valid and issues before anything is saved. The agent resolves problems and re-previews instead of saving a candidate with open problems.
Approve the rules before the agent saves them
The agent previews the configuration with build_portfolio and shows entry, sizing, exits, valid, and issues. It saves with create_portfolio only after approval and reads the returned draft back.
Approve the test cost before the agent submits once
Historical tests are paid runs. The agent shows the exact request and estimated cost for approval before submitting once, then polls the same returned test ID until complete.
Approve the paper plan and verify it is paper
The paper deployment is a separate portfolio with its own ID. The agent shows the plan for approval, verifies the deployment type, and leaves brokerage accounts unchanged.
Confirm the live move explicitly, or nothing moves
The agent reads the actual account and broker capabilities first and keeps live trading unchanged until explicit confirmation. It reports an unsupported instrument or action and stops.
Inspect the spread execution assumptions
Inspect the recorded pricing and trade details
How the example did on SPY, 2024-01-01 to 2024-12-31, starting with $10,000.
The 2024 curve pairs the spread with full-capital SPY buy and hold over the same dates. Treat the result as development evidence from examined dates and freeze the selectors before using unused dates.
Scroll sideways to compare all columns. Select a heading to sort.
| Status | COMPLETE |
| Requested period | 2024-01-01 through 2024-12-31 |
| Starting capital | $10000.00 |
| Modeled return | -13.34% |
| Reported maximum drawdown | 23.74% |
| Full-capital SPY comparator return | 25.30% |
| Recorded commissions | $22.10 |
| Engine closed-trade count | 16 |
| Peak reserved collateral | $892.00 |
| Median reserved collateral while holding positions | $596.00 |
| Pricing contract version | 8 |
| Observed / synthetic half-spread calls | 42 / 26 |
| Unknown-timing quote accesses | 2505 |
| Missing-current-quote checks | 0 |
| Rejected fill groups / marks | 0 / 0 |
| Stale basket / single-option marks | 0 / 0 |
No matching rows. Clear the filter to see all records.
Follow the recorded put trade
Inspect one recorded spread trade
One position from the worked example, opened Dec 18, 2024 and closed Dec 24, 2024.
- Long $586 put
- −$854.65
- Short $557 put
- +$369.42
- Commissions
- −$2.60
- Net
- −$487.82
Inspect the worked example's records
The example trade's fills
2024-12-18 21:00:00
ContractSPY250117P00586000
ActionBuy to open
Contracts1
Premium per share$11.0660
Fee$0.65
2024-12-18 21:00:00
ContractSPY250117P00557000
ActionSell to open
Contracts1
Premium per share$4.4239
Fee$0.65
2024-12-24 18:00:00
ContractSPY250117P00557000
ActionBuy to close
Contracts1
Premium per share$0.7297
Fee$0.65
2024-12-24 18:00:00
ContractSPY250117P00586000
ActionSell to close
Contracts1
Premium per share$2.5195
Fee$0.65
Recorded rows in source order; spacing does not represent elapsed time.
Show the table · 4 rows, 6 columns
Scroll sideways to compare all columns. Select a heading to sort.
| 2024-12-18 21:00:00 | SPY250117P00586000 | Buy to open | 1 | $11.0660 | $0.65 |
| 2024-12-18 21:00:00 | SPY250117P00557000 | Sell to open | 1 | $4.4239 | $0.65 |
| 2024-12-24 18:00:00 | SPY250117P00557000 | Buy to close | 1 | $0.7297 | $0.65 |
| 2024-12-24 18:00:00 | SPY250117P00586000 | Sell to close | 1 | $2.5195 | $0.65 |
No matching rows. Clear the filter to see all records.
Each premium is per share; one contract is 100 shares.
Inspect the candidate book
Inspect the candidate book
This is the indicative selected-candidate snapshot from the opening size decision. Compare the selected symbols and ratios with the actual Filled orders. Use the candidate bid, ask and mid to follow the sizing calculation, then compare the recorded execution premium.
Scroll sideways to compare all columns. Select a heading to sort.
| SPY250117P00586000 | $586.00 | 2025-01-17 | 30 | $11.02 | $11.08 | $11.05 | 1 | 949; sessionVolume |
| SPY250117P00557000 | $557.00 | 2025-01-17 | 30 | $4.40 | $4.52 | $4.46 | 1 | 98; sessionVolume |
No matching rows. Clear the filter to see all records.
{
"modelVersion": 2,
"enforced": true,
"chosenIndex": 0,
"path": "targetKept",
"reason": "target size limit 24 covers 1",
"requestedQuantity": 1,
"quantity": 1,
"sizingChain": [
{
"kind": "allocationImplied",
"bound": 1,
"quantity": 1,
"binding": true
},
{
"kind": "buyingPowerCap",
"bound": 13,
"quantity": 1,
"binding": false
},
{
"kind": "volumeLimit",
"bound": 24,
"quantity": 1,
"binding": false
},
{
"kind": "finalPriceRecap",
"bound": 1,
"quantity": 1,
"binding": false
}
],
"pricing": {
"mid": 15.510000000000002,
"halfSpread": 0.08999999999999986,
"participation": 0.01020408163265306,
"impactCost": 0.7034756477055026
}
}Inspect a contract-resolution audit
Inspect a contract-resolution audit
This is the latest retained resolution attempt, which can belong to a different position than the matched trade above. Its outcome, capital and risk codes explain what the resolver accepted or rejected at that decision. Follow the resulting Order events to see its fill status.
{
"time": "2024-12-27T14:31:00.000Z",
"status": "success",
"reason": null,
"riskAudit": {
"rulesetVersion": 1,
"outcome": "allowed",
"longSharesAvailable": 0,
"unhedgedShortCallContractsPerSpread": 0,
"buyingPowerEffective": 8210.239390131885,
"allocationRequested": 1,
"allocation": {
"type": "contracts",
"amount": 1
},
"portfolioValue": 8210.239390131885,
"underlyingPrice": 597.5399780273438,
"maxLossPerUnit": 595.9999999999999,
"finalContractQuantity": 1,
"collateralReserved": 595.9999999999999,
"committedCostBefore": 0
}
}Inspect the largest decline in the exported history
Inspect the largest decline in the exported history
Scroll sideways to compare all columns. Select a heading to sort.
| 2024-04-19T20:00:00.000Z | $9398.84 | $1361.00 | $554.00 |
| 2024-12-24T18:00:00.000Z | $8210.24 | $0.00 | $0.00 |
No matching rows. Clear the filter to see all records.
The exported grid's largest peak-to-trough decline was 23.70%, from $10759.84 at 2024-04-19T20:00:00.000Z to $8210.24 at 2024-12-24T18:00:00.000Z. The engine reported maximum drawdown of 23.74%. Compare the history snapshots with the reported statistic and inspect the events around this period.
No comments yet.