Explore more topics
AI trading workflows

Backtest trading strategies with Meta Muse

Use Meta Muse to validate strategy rules, submit a reviewed historical test and compare returns with SPY. Start with the completed dividend-growth example.

As of 2026-10-13

Jump to a section

TL;DR

Ask Meta Muse to create a NexusTrade custom connector, authenticate and inspect the available account tools before validating a strategy. The recorded five dividend growers test returned 44.80% versus SPY's 33.99% from January 2025 to October 2026, with 24.33% drawdown. Over January 2014 to October 2026 it returned 340.90% versus 419.23%. Both reinvest dividends; the strategy pays 0.1% stock transaction fees and the stored SPY benchmark pays no candidate commissions.

Explore the completed 2025 through 2026 test

Portfolio value (USD)

Five dividend growers and SPY: 2025-01-02 to 2026-10-07$14.7K$8.1KLargest decline in plotted observations: 22.41%, 2025-02-13 to 2025-04-082025-01-022026-10-07
Five dividend growers 2026-10-07
$14,479.88
SPY buy and hold 2026-10-07
$13,399.03

Five dividend growers: 22.41% largest decline in plotted observations. 2025-02-13 ($10,415.39) to 2025-04-08 ($8,081.82).

Five dividend growersSPY buy and holdHistorical simulation
Strategy return
44.80%
SPY return
33.99%
Maximum drawdown
24.33%
Strategy fees
$24.15

Recorded historical simulation: Jan 02, 2025 to Oct 07, 2026. Initial capital was $10,000.

Recorded in NexusTrade on October 8, 2026. Strategy assumptions: fractional shares, reinvested dividends and a 0.1% stock transaction fee. The stored SPY benchmark pays no candidate commissions.

Connect NexusTrade in your Muse conversation

Inspect the request

Ask Muse to create the custom connector, then complete its secure authentication handoff. Keep credentials out of chat. Inspect the NexusTrade tools in this conversation before continuing.

Try this example in Meta Muse

Inspect the request

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

The rules behind this result

The dividend strategy's universe, filter, ranking, equal weights and rebalance trigger in NexusTrade
NexusTrade's strategy display renders the exact saved dividend rules used by this recorded simulation.
Allocation trigger
Review allocations when portfolio value equals its initial value OR at least 30 days have passed since a filled buy. This is not an exact monthly schedule.
Equal weights
Each selected company has the same weight: five qualifying companies would target 20% each before execution effects.
Execution assumptions
Fractional shares and reinvested dividends; the original stock fee was 0.1% per transaction.

From the S&P 500 universe, keep companies meeting the ten-year annual dividend-increase filter, select the five largest by market value and weight them equally. The target is 100% invested.

Create and read back the exact strategy

Use the reviewed configuration at https://nexustrade-prod.nyc3.cdn.digitaloceanspaces.com/Explore/Data/existing-dividend-five-configuration-20261010-2468740bdaf783a8.json. Ask your client to pass that complete object to build_portfolio, inspect valid and issues, then show the canonical portfolio. After reviewing it, save the same JSON with create_portfolio and read the returned chat draft with get_portfolio. Keep the draft ID in your experiment record.

Check the SP500 universe, dividend filter, market-cap ranking, five selected names, equal weights, full deployment, 30-day trigger, fractional shares and reinvestment against the reviewed configuration. Keep the new draft undeployed while testing.

Prompt
Reproduce the five-dividend-growers experiment in Meta Muse. Read the exact configuration at https://nexustrade-prod.nyc3.cdn.digitaloceanspaces.com/Explore/Data/existing-dividend-five-configuration-20261010-2468740bdaf783a8.json. Pass the complete configuration to build_portfolio. Show valid, issues and canonical rules. Preserve the universe, filter, ranking, weighting, rebalance trigger, fractional shares and dividend policy. After I approve the rules, save the same JSON with create_portfolio, then read the returned portfolio_id with get_portfolio. Record that chat draft ID. Stop before backtesting or deployment.

Submit the matching historical test

Continue only when the connected client has the required authoring and backtest tools. Review the dates, capital, fee and dividend assumptions, and research-token cost before approving one test.

Replace the placeholder with the returned chat draft ID. Review these inputs, then approve one backtest_portfolio call. They match the displayed 2025 run. Save the accepted backtest ID before leaving the conversation.

generate_events is false for the curve comparison. Enable it when you want to inspect individual signals and orders; detailed event capture uses more credits. Keep all other settings fixed when making that inspection run.

Show the table · 7 rows, 2 columns
InputExplicit choice
portfolio_idExact returned chat draft ID
start_date / end_date2025-01-02 / 2026-10-07
intervalDay
initial_value10000
baseline_symbolSPY
fee_config / dividend_policyStock: 0.1 percent; reinvest
generate_eventsfalse for the curve; true for detailed signal and order inspection
JSON
{
  "portfolio_id": "REPLACE_WITH_RETURNED_CHAT_ID",
  "start_date": "2025-01-02",
  "end_date": "2026-10-07",
  "interval": "Day",
  "initial_value": 10000,
  "baseline_symbol": "SPY",
  "generate_events": false,
  "dividend_policy": "reinvest",
  "fee_config": {
    "Stock": {
      "amount": 0.1,
      "type": "percent"
    }
  }
}

Tool reference

  1. Validate a new candidate

    NexusTrade tool

    build_portfolio

    Review

    Canonical configuration and component issues; nothing is saved

  2. Save the validated draft

    NexusTrade tool

    create_portfolio

    Review

    Use the reviewed configuration and retain the returned chat portfolio ID

  3. Read the saved book

    NexusTrade tool

    get_portfolio

    Review

    Exact strategies, action sizing, and portfolio identity

  4. Submit the historical test

    NexusTrade tool

    backtest_portfolio

    Review

    Explicit dates, interval, capital and benchmark

  5. Poll the same operation

    NexusTrade tool

    query_backtest_status

    Review

    Terminal state and warnings; do not resubmit while running

  6. Inspect the curve

    NexusTrade tool

    query_backtest_history

    Review

    Historical values for the returned backtest_id

  7. Compare candidates

    NexusTrade tool

    compare_backtests

    Review

    Identical period and assumptions, with activity and risk

Inspect the tool operations for this experiment

Scroll sideways to compare all columns. Select a heading to sort.

Validate a new candidatebuild_portfolioCanonical configuration and component issues; nothing is saved
Save the validated draftcreate_portfolioUse the reviewed configuration and retain the returned chat portfolio ID
Read the saved bookget_portfolioExact strategies, action sizing, and portfolio identity
Submit the historical testbacktest_portfolioExplicit dates, interval, capital and benchmark
Poll the same operationquery_backtest_statusTerminal state and warnings; do not resubmit while running
Inspect the curvequery_backtest_historyHistorical values for the returned backtest_id
Compare candidatescompare_backtestsIdentical period and assumptions, with activity and risk

Inspect the discovered inputs before submitting a call. For a new candidate, validate and save it first; for a saved candidate, start with get_portfolio. Record the portfolio and backtest identifiers returned by the account tools.

Inspect the completed curve and explain a rebalance

Poll query_backtest_status with the accepted backtest_id. PENDING or RUNNING means continue with that same ID. Resolve a reported ERROR before changing the experiment. Once complete, read query_backtest_history and follow pagination for the full period. Save the completed statistics and history with the rules and inputs.

Compare value with comparisonValue, then follow cash and positionValue around a rebalance or drawdown. With detailed events enabled, ask the client to read query_backtest_events and explain which condition fired, which stocks qualified, how weights changed and which orders filled. Keep the explanation tied to returned records.

  1. Detailed signal traces

    The original example used generate_events:false. A new generate_events:true test costs 5× research tokens; review that request before submitting it and read query_backtest_events while its three-day traces are retained.

Prompt
Use the accepted backtest_id to poll query_backtest_status until complete. Then read query_backtest_history with that same ID, page 1 and page_size 500; follow all pages. Show the strategy and SPY curves, return, maximum drawdown and fees for 2025-01-02 through 2026-10-07. Explain one rebalance or drawdown using cash, holdings and recorded order events when available. Preserve the returned IDs and source fields in the experiment record. Keep polling the existing test rather than submitting another.

Compare the other recorded periods

Recorded returns through October 7, 2026

Scale: 0 to 419.23 % · zero baseline

January 2, 2025 start

  • Five growers+44.8%
  • SPY+33.99%

January 3, 2022 start

  • Five growers+134.94%
  • SPY+73.13%

January 2, 2014 start

  • Five growers+340.9%
  • SPY+419.23%

Total returns use the same $10,000 starting capital and reinvest dividends. Candidate transactions cost 0.1%; SPY pays no candidate commissions. Periods overlap and historical membership is not established by this receipt.

Show the table · 3 rows, 6 columns

Scroll sideways to compare all columns. Select a heading to sort.

2025-01-0244.80%33.99%24.33%49$24.15
2022-01-03134.94%73.13%24.16%153$103.47
2014-01-02340.90%419.23%24.16%422$331.98

The same rules also have completed runs starting in 2022 and 2014. Compare the full period table before selecting a variant; the long 2014 run returned less than SPY.

Inspect the longer recorded period

Portfolio value (USD)

Five dividend growers and SPY: 2014-01-02 to 2026-10-07$51.9K$8.2KLargest decline in plotted observations: 22.80%, 2014-11-21 to 2015-08-252014-01-022026-10-07
Five dividend growers 2026-10-07
$44,089.69
SPY buy and hold 2026-10-07
$51,922.83

Five dividend growers: 22.80% largest decline in plotted observations. 2014-11-21 ($10,674.15) to 2015-08-25 ($8,240.24).

Five dividend growersSPY buy and holdHistorical simulation
Inspect the 2014 through 2026 curve
Strategy return
340.90%
SPY return
419.23%
Maximum drawdown
24.16%
Strategy fees
$331.98

Recorded historical simulation: Jan 02, 2014 to Oct 07, 2026. Initial capital was $10,000.

These examined periods are development evidence. Historical S&P 500 membership at each date is not established by this receipt; the 2014 run is a retrospective simulation rather than proof of an investable selection.

Ask Muse to create the NexusTrade custom connector

Ask Muse to create the NexusTrade custom connector

Open a Muse personal-agent conversation and send the connection request below. Meta documents creating a Custom Connector by asking Muse in chat. Follow its authentication handoff and sign in to the intended NexusTrade account; review access before consent. Use the secure credential flow if requested, and keep passwords and tokens out of chat.

Discover the actual NexusTrade tools after authentication. Keep approval for portfolio changes and paid tests in Muse Settings; manage or disconnect the connection under Settings → Connectors. After Muse creates the connector, run the account read below before asking it to work with your portfolio.

Create a Custom Connector named NexusTrade using the Streamable HTTP MCP URL https://nexustrade.io/api/mcp. Use server OAuth discovery and guide me through sign-in. List the tools after authentication. Start with read-only owned portfolio access; do not run research jobs, backtests, edit portfolios, deploy or place orders.

Check the account with an owned portfolio read

Check the account with an owned portfolio read

Ask the agent to call fetch_portfolios with the arguments below. Compare the returned portfolio names, IDs and types with your NexusTrade account. fetch_portfolios returns portfolioId; pass that exact value as portfolio_id to get_portfolio. Inspect the structured portfolio.portfolioId, portfolio.type, portfolio.isActive, portfolio.strategies, portfolio.initialValue and portfolio.deployment. For a new account, an authenticated empty list is a valid result.

This request excludes live books and positions, includes chat drafts and inactive paper books, and returns up to 50 records per page. Follow subsequent pages before concluding a named book is absent. If OAuth expired, reconnect and repeat this read. For a missing tool, inspect the included app, environment and action permissions. An account mismatch must be fixed before a write.

JSON
{
  "include_live": false,
  "include_paper": true,
  "include_chat_portfolios": true,
  "include_inactive": true,
  "include_positions": false,
  "limit": 50,
  "page": 1
}

Create one variant, then test unseen dates

Save a separate variant that changes only SelectTop.limit from five to ten. Keep the universe, dividend filter, weights, capital, fees, interval and development dates fixed. Record both configurations and their completed backtest IDs before comparing return, drawdown, holdings and turnover.

After choosing a candidate, freeze its configuration and decision criteria. The three displayed historical periods have already been inspected. Select another chronological period you have not used in the example, corpus search or variant selection, then evaluate the frozen candidate once. Keep further revisions in a new research cycle. An optional final lockbox follows the same rule.

Keep the recorded experiment

Save the exact configuration, draft ID, accepted backtest ID, inputs and completed result together. Reopen that record after a connection interruption and continue polling the accepted run. Before paper trading, review a separate paper draft and observe its actual deployed history.

Exact strategy configuration

Inspect the complete strategy JSON
JSON
{
  "initialValue": 10000,
  "supportsFractionalShares": true,
  "dividendPolicy": "reinvest",
  "strategies": [
    {
      "active": true,
      "condition": {
        "lhs": null,
        "rhs": null,
        "comparison": null,
        "type": "Or",
        "conditions": [
          {
            "lhs": {
              "compound": false,
              "targetAssets": [],
              "type": "PortfolioValue"
            },
            "rhs": {
              "compound": false,
              "targetAssets": [],
              "type": "InitialValue"
            },
            "comparison": "equal",
            "type": "Base"
          },
          {
            "lhs": {
              "compound": false,
              "targetAssets": [],
              "side": "Buy",
              "type": "DaysSinceOrder",
              "orderStatus": "Filled"
            },
            "rhs": {
              "compound": false,
              "targetAssets": [],
              "value": 30,
              "type": "Value"
            },
            "comparison": "greaterThanOrEqual",
            "type": "Base"
          }
        ]
      },
      "action": {
        "type": "DynamicRebalance",
        "universe": {
          "source": "SP500"
        },
        "pipeline": [
          {
            "type": "Filter",
            "condition": {
              "lhs": {
                "compound": true,
                "targetAssets": [],
                "type": "ConsecutiveIncrease",
                "maxLength": 1,
                "period": "Year",
                "lookback": 10,
                "indicators": [
                  {
                    "compound": false,
                    "targetAsset": {
                      "type": "",
                      "symbol": ""
                    },
                    "targetAssets": [],
                    "type": "LastDividend"
                  }
                ]
              },
              "rhs": {
                "compound": false,
                "targetAssets": [],
                "value": 10,
                "type": "Value"
              },
              "comparison": "greaterThanOrEqual",
              "type": "Base"
            }
          },
          {
            "type": "SelectTop",
            "metric": {
              "compound": false,
              "targetAsset": {
                "type": "",
                "symbol": ""
              },
              "targetAssets": [],
              "type": "Fundamental",
              "metric": "marketCap"
            },
            "limit": 5,
            "direction": "Highest"
          }
        ],
        "weightIndicator": {
          "compound": false,
          "targetAssets": [],
          "value": 1,
          "type": "Value"
        },
        "deploymentPercent": {
          "compound": false,
          "targetAssets": [],
          "value": 100,
          "type": "Value"
        }
      },
      "orderExecution": {
        "type": "Market"
      },
      "automaticOrderApproval": false
    }
  ],
  "name": "Five largest dividend growers",
  "cash": 10000,
  "buyingPower": 10000,
  "supportsCrypto": false,
  "alertsEnabled": false
}

Chart range diagnostics

Inspect plotted ranges and their baseline
  1. Five dividend growers plotted range

    -18.18% to 48.99% from its first stored close.

  2. SPY buy and hold plotted range

    -15.08% to 35.08% from its first stored close.

  3. Five dividend growers plotted range

    -16.96% to 351.51% from its first stored close.

  4. SPY buy and hold plotted range

    -4.78% to 422.24% from its first stored close.

Continue after a Meta Muse connection or test interruption

  1. NexusTrade or a tool is missing

    Inspect the existing NexusTrade connection in Muse Settings, Connectors. Reconnect through the secure handoff and rediscover its actual tools. Confirm build_portfolio, create_portfolio, backtest_portfolio, query_backtest_status and query_backtest_history are available before starting this workflow.

  2. An ID is rejected

    Use the portfolio_id or backtest_id returned to your own connected account. A demonstration ID or redacted receipt is not an identifier for your new test.

  3. The test is PENDING or RUNNING

    Poll query_backtest_status with the same accepted backtest_id. Continue the accepted operation after reconnecting rather than submitting another test.

  4. The test reports ERROR

    Retain the returned error and exact request. Resolve that cause before changing the experiment or approving another submission.

  5. History or detailed events are unavailable

    Backtest history is retained for 30 days. Detailed events require generate_events:true and are retained for three days. Save the completed result when it returns; enabling events costs 5× research tokens.

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.