TL;DR
This Claude guide previews an AAPL rule that enters with 25% of portfolio value above the 200-day average and sells the holding below it. The preview has no forward paper results. After reviewing a historical test, create a separate Paper deployment, verify its identity and schedule, review proposed orders, observe its recorded history and pause that same book.
Create and monitor a separate paper deployment
Preview the candidate
NexusTrade toolbuild_portfolio
Identity boundaryReview the canonical configuration and fix validation issues before saving
Author the candidate
NexusTrade toolcreate_portfolio
Identity boundaryA newly authored chat portfolio, not an existing live account
Inspect the target
NexusTrade toolget_portfolio
Identity boundaryRead the exact returned ID and strategies before activation
Deploy the chat book
NexusTrade toolupdate_portfolio
Identity boundaryoperations: [{type: "deploy", portfolioId: returnedChatId}] creates paper
Find the running book
NexusTrade toolfetch_portfolios
Identity boundaryKeep the resulting deployment ID separately from the original chat/draft ID
Read actual paper history
NexusTrade toolquery_portfolio_history
Identity boundaryThe deployed portfolio curve; never substitute a backtest curve
Show the table · 6 rows, 3 columns
Scroll sideways to compare all columns. Select a heading to sort.
| Preview the candidate | build_portfolio | Review the canonical configuration and fix validation issues before saving |
| Author the candidate | create_portfolio | A newly authored chat portfolio, not an existing live account |
| Inspect the target | get_portfolio | Read the exact returned ID and strategies before activation |
| Deploy the chat book | update_portfolio | operations: [{type: "deploy", portfolioId: returnedChatId}] creates paper |
| Find the running book | fetch_portfolios | Keep the resulting deployment ID separately from the original chat/draft ID |
| Read actual paper history | query_portfolio_history | The deployed portfolio curve; never substitute a backtest curve |
No matching rows. Clear the filter to see all records.
Deploying an existing live portfolio ID can reactivate real brokerage trading. For this workflow use the newly authored chat candidate and verify the returned deployment is paper. The SDK also separates saved draft IDs from deployment.portfolioId.
Validated example: AAPL SMA200 entry
- Starting capital
- $10,000
NexusTrade validation recorded October 10, 2026 returned valid:true with no issues. This preview saved nothing and has no forward Paper history.
Entry
Buy 25% of the portfolio in AAPL whenever AAPL's price is above its 200-day average price and the portfolio holds no AAPL.
Exit
Sell 100% of the current AAPL position whenever AAPL's price is below its 200-day average price and the portfolio holds AAPL.
Rule decision example
Hypothetical: AAPL at $110, its 200-day average at $100, no AAPL held, and a $10,000 portfolio. The entry proposes $2,500 of AAPL before whole-share rounding and execution costs.
Exit and equality
At price equal to the average, neither entry nor exit passes. Below the average with a holding, the exit proposes selling the entire position.
Try this example in Claude.ai
Inspect the request
Connect Claude.ai, then copy the request below. Review the returned result before continuing.
Connect NexusTrade in Claude
Open Customize > Connectors, choose + Add > Add custom connector, enter NexusTrade and the endpoint below, then Continue. Review detected authentication, Continue, choose Sign in now and finish with Add. Complete NexusTrade OAuth. In this conversation, open + > Connectors and enable NexusTrade.
On Team or Enterprise, the authorized owner or role adds the connector first; each member connects their own account. Use Search and tools to select the tools needed for this task. Keep account-changing approvals enabled.
NexusTrade server URL
https://nexustrade.io/api/mcpCheck the returned account tools
The result is a paginated object with portfolios, total and totalPages. Walk pages when necessary. A new account may return an empty list. Keep authentication errors and missing results separate. Do not infer a successful connection from a tool list alone.
Use fetch_portfolios with the JSON below. Read a portfolioId returned by that call with get_portfolio, setting its portfolio_id argument to the same value. Compare the name, type and strategies with the intended NexusTrade account. If no portfolio exists, keep the empty result and continue to the new draft preview below. Do not create anything during this check.
{
"include_paper": true,
"include_live": false,
"include_chat_portfolios": true,
"include_positions": false,
"limit": 20,
"page": 1
}Confirm permission for this task
Discover build_portfolio, create_portfolio, get_portfolio and update_portfolio, fetch_portfolios and query_portfolio_history in the current connection. Check that the granted app actions allow this task before submitting anything. A plugin listing or successful read does not grant write access. Keep approvals enabled for saving and account changes.
Freeze this proposed rule before submitting anything
This teaching example uses AAPL only, no leverage and a $10,000 starting balance. At each daily evaluation, compare Price with its 200-period SimpleMovingAverage using a Day window. Enter with 25% of portfolio value in AAPL only when price is above the average and no AAPL is held. Sell the entire current holding when price is below the average; equality triggers neither rule. The remaining capital starts in cash. Exposure can drift with prices; this pair does not continuously rebalance to 25%. Review the exact position guards and allocation units.
Record any completed backtest of these exact rules before beginning paper observation. Keep its dates, fees, benchmark and draft ID with the frozen configuration. Select a separate chronological test period before reviewing its results. The initial 25% entry can change weight as prices move; inspect actual holdings during paper observation.
Author and read back a new candidate
Use structured strategy objects after reviewing them. Read condition/action fields rather than relying on a strategy name. Saving the chat candidate does not activate a paper or brokerage portfolio.
Read get_portfolio structured output under portfolio: portfolioId, type, isActive, strategies, initialValue and deployment. Resolve a mismatch before using that ID in another operation.
Draft a NEW chat portfolio named AAPL SMA200 25pct v1 with initialValue 10000 and dividendPolicy reinvest. Author two explicit strategies for the daily AAPL Price versus 200-Day SimpleMovingAverage guarded entry/exit rule above, buying 25% of total portfolio value only while flat and closing the held position below the average; exposure may drift after entry. Show complete condition and action objects, sizing, evaluation schedule and orderExecution before saving. Call build_portfolio with the full structured draft first. Inspect valid, the canonical portfolio and every reported issue. Fix issues and repeat the preview; it does not persist a candidate. After I approve the definition, use create_portfolio structured name, initialValue, dividendPolicy and strategies fields. Read the returned chat portfolio with get_portfolio using its actual portfolio_id. Retain the exact strategy definition, review notes and returned operation IDs. Stop after saving; do not backtest or deploy yet.Review the historical run and set the paper budget
Read the completed historical result for this exact strategy version before activation. Record the paper start date, $10,000 simulated initial balance, 25% initial entry allocation, intended evaluation schedule and review dates. The holding's portfolio weight can drift after entry. Name the conditions that would pause the experiment, such as an incorrect signal, a duplicate order or unexpected exposure. Historical validation and paper observation answer different questions.
A Day backtest interval and Day indicator window do not set the running schedule. Inspect deployment.frequency in get_portfolio: Constant and OpenClose are different modes, and OpenClose is not once per day. Record the actual frequency and timing fields before judging forward activity.
Activate only the reviewed chat candidate
After reviewing the plan, use this update_portfolio operation with the newly authored chat ID. Deploying that chat candidate creates a separate paper book. An existing live ID can reactivate brokerage trading, so read the target first and do not substitute a live portfolio. This example is simulated money only.
{
"operations": [
{
"type": "deploy",
"portfolioId": "REPLACE_WITH_RETURNED_CHAT_ID"
}
]
}Find the running paper identity
Call fetch_portfolios with these flags after activation. Compare the deployment response with the returned rows. Require type:paper, the expected strategy/name and isActive:true, then read the running portfolio with get_portfolio. Record its portfolioId separately from the chat candidate ID. If the response was interrupted, recover this book before retrying deployment.
{
"include_paper": true,
"include_live": false,
"include_chat_portfolios": false,
"include_inactive": true,
"search": "AAPL SMA200 25pct v1",
"page": 1,
"limit": 20
}Verify evaluation and review paper orders
Open the verified running paper portfolio in NexusTrade and inspect its Deployment Center. The Automated Trading switch controls strategy evaluation: if you choose to change it, select Save Changes and read the same portfolio again. Confirm isActive and record the actual deployment frequency. This control is separate from the live-only Autonomous Trading approval policy; paper portfolios remain on manual order review.
When a signal creates a pending simulated order, open Order Management, select Paper and Needs Review, and compare its portfolio, symbol, side and size with the frozen rules before choosing Confirm. Check the resulting order state and paper history. A pending approval is not a filled trade. An empty history can mean no qualifying signal or an unapproved order; it does not justify another deployment.
Read forward history, then pause the verified book
A new deployment can have little or no history. Empty forward history is not a backtest result and does not justify inventing a curve or redeploying. get_portfolio_performance returns aggregates; query_portfolio_history supplies the recorded curve.
Paper fills use simulated money. Brokerage permissions, order handling, spreads and fill availability need a separate live review. Pausing automation is not an instruction to liquidate positions; inspect holdings and any outstanding orders separately.
Show the table · 4 rows, 2 columns
| Observation to record | Where it comes from |
|---|---|
| Running ID, activation date and actual cadence | Deployment response and get_portfolio |
| First recorded time/value and exposure | query_portfolio_history and account positions |
| Unexpected activity or signal mismatch | Compare observed activity with the frozen strategy JSON |
| Pause time and inactive confirmation | undeploy response and get_portfolio for the same ID |
No matching rows. Clear the filter to see all records.
Fill this log with returned observations. These rows contain no invented paper results.
Call query_portfolio_history with portfolio_id set to the verified running paper ID, start_date set to the recorded activation date, page:1 and page_size:500. Preserve the returned time/value observations and continue pages. Compare those values with recorded cash changes, strategy edits and actual activity.
To pause after reviewing the exact target, call update_portfolio with:
{
"operations": [
{
"type": "undeploy",
"portfolioId": "REPLACE_WITH_VERIFIED_RUNNING_PAPER_ID"
}
]
}
Then call get_portfolio with portfolio_id set to that same running paper ID. Confirm portfolio.type:paper and portfolio.isActive:false. Keep the existing history; do not delete the book.Exact validation request and provenance
Inspect the complete paper-candidate JSON and validation provenance
On October 10, 2026, we constructed the complete AAPL configuration below with the NexusTrade Python SDK and sent it to build_portfolio. The product returned valid: true, an empty issues list and the canonical rule descriptions in this table.
The entry spends 25% of total portfolio value only while the asset is not held. Below the 200-day average, the exit sells the full current holding; equality triggers neither rule. This is an entry allocation, not continuous rebalancing or a promise that exposure stays capped at 25%. Price movements can change the holding's portfolio weight.
Copy the full request into build_portfolio before saving it. The actual preview saved nothing, submitted no backtest and activated no paper book. Both returned rules have automaticOrderApproval: false. Use the client steps below to create and observe your own paper draft.
| Product response | Observed value |
|---|---|
| Validation | valid: true; issues: [] |
| Capital | initialValue: 10000 |
| Entry | Buy 25% of the portfolio in AAPL whenever AAPL's price is above its 200-day average price and the portfolio holds no AAPL. |
| Exit | Sell 100% of the current AAPL position whenever AAPL's price is below its 200-day average price and the portfolio holds AAPL. |
| Order approval | automaticOrderApproval: false on both returned rules |
| Persistence | Nothing was saved |
No matching rows. Clear the filter to see all records.
{
"name": "Public SEO example - AAPL SMA200 quarter entry",
"initialValue": 10000,
"cash": 10000,
"buyingPower": 10000,
"strategies": [
{
"name": "Guarded 25-percent entry",
"condition": {
"type": "And",
"conditions": [
{
"type": "Base",
"lhs": {
"type": "Price",
"targetAsset": {
"type": "Stock",
"symbol": "AAPL",
"name": "AAPL"
}
},
"comparison": "greaterThan",
"rhs": {
"type": "SimpleMovingAverage",
"targetAsset": {
"type": "Stock",
"symbol": "AAPL",
"name": "AAPL"
},
"window": {
"length": 200,
"interval": "Day"
}
}
},
{
"type": "Base",
"lhs": {
"type": "PositionValue",
"targetAssets": [
{
"type": "Stock",
"symbol": "AAPL",
"name": "AAPL"
}
]
},
"comparison": "equal",
"rhs": {
"type": "Value",
"value": 0
}
}
]
},
"action": {
"type": "Buy",
"targetAsset": {
"type": "Stock",
"symbol": "AAPL",
"name": "AAPL"
},
"amount": {
"type": "percent of portfolio",
"amount": 25
}
},
"orderExecution": {
"type": "Market"
}
},
{
"name": "Close below average",
"condition": {
"type": "And",
"conditions": [
{
"type": "Base",
"lhs": {
"type": "Price",
"targetAsset": {
"type": "Stock",
"symbol": "AAPL",
"name": "AAPL"
}
},
"comparison": "lessThan",
"rhs": {
"type": "SimpleMovingAverage",
"targetAsset": {
"type": "Stock",
"symbol": "AAPL",
"name": "AAPL"
},
"window": {
"length": 200,
"interval": "Day"
}
}
},
{
"type": "Base",
"lhs": {
"type": "PositionValue",
"targetAssets": [
{
"type": "Stock",
"symbol": "AAPL",
"name": "AAPL"
}
]
},
"comparison": "greaterThan",
"rhs": {
"type": "Value",
"value": 0
}
}
]
},
"action": {
"type": "Sell",
"targetAsset": {
"type": "Stock",
"symbol": "AAPL",
"name": "AAPL"
},
"amount": {
"type": "percent of current positions",
"amount": 100
}
},
"orderExecution": {
"type": "Market"
}
}
],
"supportsFractionalShares": false,
"supportsCrypto": false,
"alertsEnabled": false,
"dividendPolicy": "reinvest"
}
No comments yet.