Explore more topics
AI trading task guides

Paper trade with Cursor

Preview this exact candidate, review a separate Paper deployment, then inspect and pause the running book.

As of 2026-10-11

Jump to a section

TL;DR

The Cursor example buys 10 QQQ shares when price exceeds its 100-day average and no QQQ is held, then sells the entire holding below that average. Equality triggers neither rule. Validation saved nothing and produced no forward paper history. Create an inactive draft, review a separate Paper deployment, verify its new ID and evaluation schedule, and inspect actual paper orders and history. Pause that verified running book when observation ends.

Create and monitor a separate paper deployment

  1. Preview the candidate

    NexusTrade tool

    build_portfolio

    Identity boundary

    Review the canonical configuration and fix validation issues before saving

  2. Author the candidate

    NexusTrade tool

    create_portfolio

    Identity boundary

    A newly authored chat portfolio, not an existing live account

  3. Inspect the target

    NexusTrade tool

    get_portfolio

    Identity boundary

    Read the exact returned ID and strategies before activation

  4. Deploy the chat book

    NexusTrade tool

    update_portfolio

    Identity boundary

    operations: [{type: "deploy", portfolioId: returnedChatId}] creates paper

  5. Find the running book

    NexusTrade tool

    fetch_portfolios

    Identity boundary

    Keep the resulting deployment ID separately from the original chat/draft ID

  6. Read actual paper history

    NexusTrade tool

    query_portfolio_history

    Identity boundary

    The 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 candidatebuild_portfolioReview the canonical configuration and fix validation issues before saving
Author the candidatecreate_portfolioA newly authored chat portfolio, not an existing live account
Inspect the targetget_portfolioRead the exact returned ID and strategies before activation
Deploy the chat bookupdate_portfoliooperations: [{type: "deploy", portfolioId: returnedChatId}] creates paper
Find the running bookfetch_portfoliosKeep the resulting deployment ID separately from the original chat/draft ID
Read actual paper historyquery_portfolio_historyThe deployed portfolio curve; never substitute a backtest curve

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: QQQ SMA100

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.

  1. Entry

    Buy 10 shares of QQQ whenever QQQ's price is above its 100-day average price and the portfolio holds no QQQ.

  2. Exit

    Sell 100% of the current QQQ position whenever QQQ's price is below its 100-day average price and the portfolio holds QQQ.

  3. Rule decision example

    Hypothetical: QQQ at $110, its 100-day average at $100, and no QQQ held. The entry proposes buying 10 shares. An existing holding blocks another entry.

  4. 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 Cursor

Inspect the request

Connect Cursor, then copy the request below. Review the returned result before continuing.

Add the connection to the Cursor project

Open the folder where you will keep your research. Merge the JSON below into .cursor/mcp.json under mcpServers, preserving other servers. Use ~/.cursor/mcp.json only if you want the connection available across projects.

Manage the server from Customize and complete its browser OAuth connection to NexusTrade. You can instead use Add to Cursor on the NexusTrade developer page. Verify tool availability inside the same project chat before reading or changing account resources.

For the initial MCP check, use Agent and approve only a project you recognize. Cursor CLI has separate account and MCP sign-ins; follow the connection guide for both before sending the public SEC check.

JSON
{
  "mcpServers": {
    "nexustrade": {
      "url": "https://nexustrade.io/api/mcp"
    }
  }
}

Confirm access with an owned-resource read

Ask the client to discover tools and call fetch_portfolios, then pass one returned portfolioId as portfolio_id to get_portfolio. Inspect portfolioId, type, name, isActive and strategies; compare them with the same saved book in NexusTrade. Do not copy IDs from a demonstration. An empty list can be valid for a new account.

A tool-not-found error means revisit discovery. An authorization error means check the selected NexusTrade environment/account and OAuth connection. Do not ask the model to invent a replacement identifier.

Prompt
Use only NexusTrade read tools. Call fetch_portfolios, then pass one returned portfolioId as the portfolio_id input to get_portfolio. Show portfolioId, type, name, isActive and complete strategies. Do not create, edit, backtest, deploy or place orders.

Create a new candidate and observation record

Daily QQQ long/cash proposal: buy 10 shares only when no QQQ position is held and price is above its 100-day simple moving average; sell the entire QQQ position when price is below that average. Equal values take no action. Keep a separate buy-and-hold QQQ control; the candidate must not accumulate 10 more shares on each above-average day.

Create paper/qqq-forward-log.md with the draft ID, exact configuration, intended $10,000 simulated starting capital, activation date and a review date 30 calendar days later. Those are proposed observation inputs, not recorded performance. Historical testing should be reviewed separately before activation.

Ask Cursor to call build_portfolio with the complete candidate. Inspect valid, canonical portfolio and each issue path, component and message. Fix issues and preview again. After valid is true and you have reviewed the rule, pass the same JSON to create_portfolio and read the saved draft with get_portfolio. Verify type=chat and isActive=false. Keep the generated JSON and returned ID in the record; a portfolio name containing paper does not establish deployment type.

Review the paper deployment operation

Show the actual update_portfolio operation before activation: operations contains a deploy entry whose portfolioId is the newly authored chat draft ID. Deploying a chat draft creates a separate paper book. An existing live ID can reactivate brokerage trading, so verify the draft type immediately before the call.

Prompt
Preview a new candidate with build_portfolio using this rule: Daily QQQ long/cash proposal: buy 10 shares only when no QQQ position is held and price is above its 100-day simple moving average; sell the entire QQQ position when price is below that average. Equal values take no action. Keep a separate buy-and-hold QQQ control; the candidate must not accumulate 10 more shares on each above-average day. Inspect valid, issues and canonical portfolio; fix issues and preview again. When valid and reviewed, pass the same JSON to create_portfolio. Save its full JSON and actual returned ID in paper/qqq-forward-log.md. Use get_portfolio to verify type=chat and isActive=false. Show operations with type deploy and portfolioId equal to that chat ID. Wait for my approval. After activation, find the new deployment with fetch_portfolios and read it with get_portfolio. Stop if type is not paper. Do not deploy an existing live ID.

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.

Verify the running identity and capital

After the approved deployment, use fetch_portfolios to find the new running book and get_portfolio on its returned ID. Confirm type=paper, isActive, strategies, initialValue and the returned deployment settings.

Record the actual deployment frequency: Constant and OpenClose are evaluation schedules. A Day backtest interval or a day-based moving-average window does not set the paper evaluation cadence. Compare the capital and rules with the approved record before treating the experiment as started. Keep the chat draft ID and running portfolioId separately.

If several portfolios share a name, use returned IDs and the exact strategies rather than selecting by name alone. A transport timeout does not prove deployment failed. Read the account resources before attempting another deploy; duplicate deployments can create separate experiments.

Observe recorded paper history and recover

If NexusTrade is absent, check the project folder and .cursor/mcp.json location. Restart Cursor after changing custom configuration and inspect the server in Customize. Finish or repeat the requested OAuth flow if authorization has expired. Review file diffs separately from remote operations: reverting an editor change does not cancel an accepted job or undo a deployment.

Use query_portfolio_history with the verified running portfolio_id for the observation period. It returns recorded time/value points from the deployed book. get_portfolio_performance returns aggregates, while query_backtest_history reads historical simulations; neither replaces the deployed curve.

If history is empty, check type, activation time, active state and whether observations have been recorded. Do not backtest the same rules and label that curve paper performance. Record actual positions, activity and any rule/cash changes beside the curve. At the review date compare behavior with the frozen plan.

When the observation ends, review update_portfolio with operations containing type undeploy and portfolioId equal to the verified running paper ID. After the approved pause, call get_portfolio again and require type=paper and isActive=false. Keep the recorded history; pausing does not require deleting the book.

Pause the verified paper book

Replace the placeholder with the running paper ID you have just read with get_portfolio. Submit this operation only after reviewing that identity and approving the pause. Read the same ID afterward and require type=paper and isActive=false.

JSON
{
  "operations": [
    {
      "type": "undeploy",
      "portfolioId": "<verified-running-paper-id>"
    }
  ]
}

Costs and the next task

The local file and proposed rule are planning artifacts. Research and backtest submissions can consume credits; detailed backtest events increase cost. Check your plan and the proposed operation before submitting. Review the exact connected account before making changes.

For live deployment, review the separate broker guide, exact trading account and permissions. Choose the broker guide that matches your trading account.

Exact validation request and provenance

Inspect the complete paper-candidate JSON and validation provenance

On October 10, 2026, we built this complete QQQ candidate with the NexusTrade Python SDK and sent it to build_portfolio. The product returned valid: true, no issues, and the two canonical rules shown below. The entry buys 10 shares, with a zero-position guard; the exit closes the current holding only when price is strictly below its 100-day average. Equality triggers neither rule.

Copy this complete request into build_portfolio to inspect the same candidate. The preview saved nothing and started no historical test or paper deployment. Use the client steps below to create and observe your own paper draft.

Both returned rules have automaticOrderApproval: false. Keep the saved draft ID, accepted backtest ID and running paper ID in separate fields. The configuration's Day indicator window does not set the deployed book's evaluation schedule.

Product responseObserved value
Validationvalid: true; issues: []
CapitalinitialValue: 10000
EntryBuy 10 shares of QQQ whenever QQQ's price is above its 100-day average price and the portfolio holds no QQQ.
ExitSell 100% of the current QQQ position whenever QQQ's price is below its 100-day average price and the portfolio holds QQQ.
Order approvalautomaticOrderApproval: false on both returned rules
PersistenceNothing was saved
JSON
{
  "name": "Public SEO example - QQQ SMA100 ten shares",
  "initialValue": 10000,
  "cash": 10000,
  "buyingPower": 10000,
  "strategies": [
    {
      "name": "Guarded ten-share entry",
      "condition": {
        "type": "And",
        "conditions": [
          {
            "type": "Base",
            "lhs": {
              "type": "Price",
              "targetAsset": {
                "type": "Stock",
                "symbol": "QQQ",
                "name": "QQQ"
              }
            },
            "comparison": "greaterThan",
            "rhs": {
              "type": "SimpleMovingAverage",
              "targetAsset": {
                "type": "Stock",
                "symbol": "QQQ",
                "name": "QQQ"
              },
              "window": {
                "length": 100,
                "interval": "Day"
              }
            }
          },
          {
            "type": "Base",
            "lhs": {
              "type": "PositionValue",
              "targetAssets": [
                {
                  "type": "Stock",
                  "symbol": "QQQ",
                  "name": "QQQ"
                }
              ]
            },
            "comparison": "equal",
            "rhs": {
              "type": "Value",
              "value": 0
            }
          }
        ]
      },
      "action": {
        "type": "Buy",
        "targetAsset": {
          "type": "Stock",
          "symbol": "QQQ",
          "name": "QQQ"
        },
        "amount": {
          "type": "number of assets",
          "amount": 10
        }
      },
      "orderExecution": {
        "type": "Market"
      }
    },
    {
      "name": "Close below average",
      "condition": {
        "type": "And",
        "conditions": [
          {
            "type": "Base",
            "lhs": {
              "type": "Price",
              "targetAsset": {
                "type": "Stock",
                "symbol": "QQQ",
                "name": "QQQ"
              }
            },
            "comparison": "lessThan",
            "rhs": {
              "type": "SimpleMovingAverage",
              "targetAsset": {
                "type": "Stock",
                "symbol": "QQQ",
                "name": "QQQ"
              },
              "window": {
                "length": 100,
                "interval": "Day"
              }
            }
          },
          {
            "type": "Base",
            "lhs": {
              "type": "PositionValue",
              "targetAssets": [
                {
                  "type": "Stock",
                  "symbol": "QQQ",
                  "name": "QQQ"
                }
              ]
            },
            "comparison": "greaterThan",
            "rhs": {
              "type": "Value",
              "value": 0
            }
          }
        ]
      },
      "action": {
        "type": "Sell",
        "targetAsset": {
          "type": "Stock",
          "symbol": "QQQ",
          "name": "QQQ"
        },
        "amount": {
          "type": "percent of current positions",
          "amount": 100
        }
      },
      "orderExecution": {
        "type": "Market"
      }
    }
  ],
  "supportsFractionalShares": false,
  "supportsCrypto": false,
  "alertsEnabled": false,
  "dividendPolicy": "cash"
}

Compare a historical example

Continue exploring

Discussion

Sign in or create a free account to join the discussion.

No comments yet.

Aurora · AI research assistant

Try this in Aurora

Edit the request, then open it in Aurora. You choose when to send it.