TL;DR
This SOL momentum strategy buys when 14 day RSI exceeds 60 and exits when RSI falls to 50 or below, allocating 95% of buying power per entry. Its 2024 simulation lost 5.18%, reported 26.35% maximum drawdown and incurred $2,568.88 in fees on $10,000 of starting capital. A position remained open at year end. The SPY and Bitcoin curves provide context, not a SOL buy and hold control. Follow the recorded entries and fills before testing a separate variant.
Follow the example
Read this pair's entry and exit
Read this pair’s entry condition, purchase amount and exit in the saved rules below.
- Entry
- Saved rule: RSI(14, Day) > 60 AND position value = 0
- Exit
- Saved rule: RSI(14, Day) <= 50 AND position value > 0
- Allocation
- Saved rule: 95% of buying power per entry; sell 100% of held units on exit
- Pair
- Saved rule: SOL-USD
The plain-language purpose matches the saved rules below. Keep the rule, purchase size and exit together when creating your version.
- SOL RSI momentum 2024-12-31, 21:00:00 UTC
- 9,481.94
- SPY buy and hold 2024-12-31, 21:00:00 UTC
- 12,530.29
- BTC buy and hold 2024-12-31, 21:00:00 UTC
- 21,926.92
Completed 2024 backtest
Explore the completed 2024 simulation below. Compare its recorded return and drawdown with the plotted benchmarks, then follow the captured fills. The original history, fees and execution assumptions remain available below.
The exact stored history shown here, with its source's period, comparisons and limits. Opening the walkthrough does not rerun it.
Preview this strategy in Aurora
Review the provided strategy request without changing its pair or sizing. Ask for a draft preview before any saved candidate or paid test.
An inspectable candidate. New dates or a changed rule define another experiment, not the published result.
Choose a step to follow the example. Opening a request lets you review it; it does not submit a job or change your account.
Inspect the recorded trades
Mar 21, 2024
PairSOL-USD
SideSell
Units (rounded)0.00347819
Submitted price$176.99
Filled price$176.99
Fee$0.00
Mar 25, 2024
PairSOL-USD
SideBuy
Units (rounded)44.41392493
Submitted price$186.77
Filled price$186.77
Fee$58.07
Mar 27, 2024
PairSOL-USD
SideSell
Units (rounded)44.10302746
Submitted price$182.57
Filled price$182.57
Fee$56.36
Apr 02, 2024
PairSOL-USD
SideSell
Units (rounded)0.31089747
Submitted price$177.36
Filled price$177.36
Fee$0.39
Apr 20, 2024
PairSOL-USD
SideBuy
Units (rounded)52.89928140
Submitted price$151.37
Filled price$151.37
Fee$56.05
Apr 24, 2024
PairSOL-USD
SideSell
Units (rounded)52.52898643
Submitted price$150.29
Filled price$150.29
Fee$55.26
Apr 25, 2024
PairSOL-USD
SideSell
Units (rounded)0.37029497
Submitted price$143.69
Filled price$143.69
Fee$0.37
May 03, 2024
PairSOL-USD
SideBuy
Units (rounded)55.12765659
Submitted price$142.30
Filled price$142.30
Fee$54.91
Recorded rows in source order; spacing does not represent elapsed time.
Show the table · 8 rows, 7 columns
Scroll sideways to compare all columns. Select a heading to sort.
| Mar 21, 2024 | SOL-USD | Sell | 0.00347819 | $176.99 | $176.99 | $0.00 |
| Mar 25, 2024 | SOL-USD | Buy | 44.41392493 | $186.77 | $186.77 | $58.07 |
| Mar 27, 2024 | SOL-USD | Sell | 44.10302746 | $182.57 | $182.57 | $56.36 |
| Apr 02, 2024 | SOL-USD | Sell | 0.31089747 | $177.36 | $177.36 | $0.39 |
| Apr 20, 2024 | SOL-USD | Buy | 52.89928140 | $151.37 | $151.37 | $56.05 |
| Apr 24, 2024 | SOL-USD | Sell | 52.52898643 | $150.29 | $150.29 | $55.26 |
| Apr 25, 2024 | SOL-USD | Sell | 0.37029497 | $143.69 | $143.69 | $0.37 |
| May 03, 2024 | SOL-USD | Buy | 55.12765659 | $142.30 | $142.30 | $54.91 |
No matching rows. Clear the filter to see all records.
Follow the Filled events by pair, side and time. Compare the submitted price, filled price, fractional quantity and fee. This table shows up to eight orders from the captured excerpt (50 Filled events).
For a percentage fee, multiply the traded notional by 0.007. To follow a position, start with a purchase and inspect subsequent sale quantities, remaining holdings and cash flows. For the weekly accumulation example, follow each purchase and the resulting position value.
The algorithm
Entry
RSI(14, Day) > 60 AND position value = 0
Exit
RSI(14, Day) <= 50 AND position value > 0
Allocation
95% of buying power per entry; sell 100% of held units on exit
Pair
SOL-USD
Execution
Market; fractional units enabled
Starting capital
$10,000; no additional deposits
Show the table · 6 rows, 2 columns
| Decision | Saved rule |
|---|---|
| Entry | RSI(14, Day) > 60 AND position value = 0 |
| Exit | RSI(14, Day) <= 50 AND position value > 0 |
| Allocation | 95% of buying power per entry; sell 100% of held units on exit |
| Pair | SOL-USD |
| Execution | Market; fractional units enabled |
| Starting capital | $10,000; no additional deposits |
No matching rows. Clear the filter to see all records.
This example trades SOL-USD as a spot Cryptocurrency asset. The saved rules were read back and verified with automated trading off.
Create the same strategy
Ask Aurora to build the rules above, review the preview, then save the draft with automated trading off. Confirm the Cryptocurrency pair, allocation and entry and exit conditions in the saved rules.
In the native Strategies editor, use Buy and Sell actions with the same Cryptocurrency pair. Add the indicator and position-value conditions shown above. The weekly accumulation example uses a single Buy rule with a seven-day DaysSinceOrder condition.
Plan a separate variant and later test
Review the optional next experiment
After reviewing the recorded example, use the prepared request above for the original rules. This optional plan covers a separate variant and a later test.
Create one variant, then test unseen dates
Ask: "Change only the entry allocation from 95% to 75% of buying power. Show the rule diff and compare both candidates on the 2024 development period with every other setting fixed." After choosing, freeze the rules and select another test period you have not inspected. The displayed 2024 results already make 2024 a viewed development period. Keep any later revisions in a new research cycle.
Create and backtest with Python
Use the Python SDK instead of Aurora
Python SDK 1.42.0. Save the runner below as run_sol_rsi_momentum.py.
Install and download
python3 -m pip install nexustrade==1.42.0
export NEXUSTRADE_API_KEY="YOUR_API_KEY"
curl --fail --output sol_rsi_momentum.py https://nexustrade.io/seo/strategy-examples/sol-rsi-momentum.py
Create, test and inspect
from sol_rsi_momentum import create_sol_rsi_momentum, backtest_sol_rsi_momentum
book = create_sol_rsi_momentum()
completed = backtest_sol_rsi_momentum()
print(completed["result"])
Run
python3 run_sol_rsi_momentum.py
Python strategy and backtest functions
View complete Python SDK functions
The backtest function submits the 2024 test with SPY as its benchmark, records events and waits for the result. Use a new request key when changing rules, dates or fees.
import nexustrade as nt
def create_sol_rsi_momentum():
asset = nt.crypto_asset("SOL-USD")
return nt.portfolio(
"Public SEO crypto example - SOL RSI momentum",
[
nt.strategy(
"Enter SOL RSI momentum",
((nt.RSI(asset, 14, "Day") > nt.Value(60)) & (nt.PositionValue(asset) == nt.Value(0))),
nt.buy(asset, 95, "percent of buying power")
),
nt.strategy(
"Exit SOL RSI momentum",
((nt.RSI(asset, 14, "Day") <= nt.Value(50)) & (nt.PositionValue(asset) > nt.Value(0))),
nt.sell(asset, 100, "percent of current positions")
),
],
initial_value=10000,
supports_crypto=True,
supports_fractional_shares=True,
alerts_enabled=False,
dividend_policy='cash',
)
def backtest_sol_rsi_momentum(client=None):
client = client or nt.NexusTradeClient.from_environment()
operation = client.create_backtest(
nt.backtest(
create_sol_rsi_momentum(),
start_date="2024-01-01", end_date="2024-12-31",
interval="Day", baseline_symbol="SPY",
initial_value=10000, generate_events=True,
dividend_policy="cash",
fee_config={"Stock": {"type": "percent", "amount": 0.1},
"Cryptocurrency": {"type": "percent", "amount": 0.7},
"Option": {"type": "dollars", "amount": 0.65}},
),
idempotency_key="explore-sol-rsi-momentum-2024-spy-v1",
)
return client.wait_for_backtest(operation["id"])
# Build locally: book = create_sol_rsi_momentum()
# Run and inspect: completed = backtest_sol_rsi_momentum(); print(completed["result"])
Create and backtest with TypeScript
Use the TypeScript SDK instead of Aurora
TypeScript SDK 1.42.0. Save the runner below as run-sol-rsi-momentum.ts.
Install and download
npm install nexustrade@1.42.0
npm install --save-dev tsx
export NEXUSTRADE_API_KEY="YOUR_API_KEY"
curl --fail --output sol-rsi-momentum.ts https://nexustrade.io/seo/strategy-examples/sol-rsi-momentum.ts
Create, test and inspect
import { createSolRsiMomentum, backtestSolRsiMomentum } from "./sol-rsi-momentum";
async function main() {
const book = createSolRsiMomentum();
const completed = await backtestSolRsiMomentum();
console.log(completed.result);
}
main().catch((error: unknown) => {
console.error(error);
process.exitCode = 1;
});
Run
npx tsx run-sol-rsi-momentum.ts
TypeScript strategy and backtest functions
View complete TypeScript SDK functions
The same rules, dates and fees are used in both SDKs. The backtest function keeps its request key across retries.
import * as nt from "nexustrade";
export function createSolRsiMomentum() {
const asset = nt.cryptoAsset("SOL-USD");
return nt.portfolio(
"Public SEO crypto example - SOL RSI momentum",
[
nt.strategy(
"Enter SOL RSI momentum",
nt.and(nt.gt(nt.RSI(asset, 14, "Day"), nt.Value(60)), nt.eq(nt.PositionValue(asset), nt.Value(0))),
nt.buy(asset, 95, "percent of buying power")
),
nt.strategy(
"Exit SOL RSI momentum",
nt.and(nt.lte(nt.RSI(asset, 14, "Day"), nt.Value(50)), nt.gt(nt.PositionValue(asset), nt.Value(0))),
nt.sell(asset, 100, "percent of current positions")
),
],
{ initialValue: 10000, supportsCrypto: true, supportsFractionalShares: true, alertsEnabled: false, dividendPolicy: "cash" }
);
}
export async function backtestSolRsiMomentum(client = new nt.NexusTradeClient()) {
const operation = await client.createBacktest(
nt.backtest(createSolRsiMomentum(), {
startDate: "2024-01-01", endDate: "2024-12-31",
interval: "Day", baselineSymbol: "SPY",
initialValue: 10000, generateEvents: true,
dividendPolicy: "cash",
feeConfig: {
Stock: { type: "percent", amount: 0.1 },
Cryptocurrency: { type: "percent", amount: 0.7 },
Option: { type: "dollars", amount: 0.65 },
},
}),
{ idempotencyKey: "explore-sol-rsi-momentum-2024-spy-v1" }
);
if (typeof operation.id !== "string") throw new Error("Missing backtest ID");
return client.waitForBacktest(operation.id);
}
// Build locally: const book = createSolRsiMomentum();
// Run and inspect: const completed = await backtestSolRsiMomentum(); console.log(completed.result);
Completed 2024 backtest
- SOL RSI momentum 2024-12-31, 21:00:00 UTC
- 9,481.94
- SPY buy and hold 2024-12-31, 21:00:00 UTC
- 12,530.29
- BTC buy and hold 2024-12-31, 21:00:00 UTC
- 21,926.92
Show the table · 11 rows, 2 columns
Scroll sideways to compare all columns. Select a heading to sort.
| Status | COMPLETE |
| Backtest return | -5.18% |
| Reported maximum drawdown | 26.35% |
| SPY buy-and-hold return | 25.30% |
| BTC buy-and-hold return | 119.27% |
| Total recorded trading fees | $2568.88 |
| Engine closed-trade count | 45 |
| Starting capital | $10000.00 |
| Ending portfolio value | $9481.94 |
| Ending cash | $421.52 |
| Ending position value | $9060.42 |
No matching rows. Clear the filter to see all records.
This saved algorithm completed a Day backtest from 2024-01-01 through 2024-12-31, with $10000.00 starting capital. The chart includes all 744 exported history points.
Compare the strategy with SPY and BTC buy and hold. Each benchmark invests the full $10000.00 starting balance over the same 2024 period. SPY follows its trading sessions; BTC includes weekends. This algorithm follows its own allocation and entry/exit rules, with 0.7% of traded notional charged on each fill. Explore cash and position values to see how capital was deployed.
Understand this entry with Aurora
SOL-USD 14 day RSI > constant
Left value61.5322>Right value60ResultTrueSOL-USD position value = constant
Left value0=Right value0ResultTrue
Show the table · 2 rows, 5 columns
Scroll sideways to compare all columns. Select a heading to sort.
| SOL-USD 14 day RSI > constant | 61.5322 | > | 60 | True |
| SOL-USD position value = constant | 0 | = | 0 | True |
No matching rows. Clear the filter to see all records.
At 2024-12-31T14:30:00.000Z, the recorded rule was: 14 Day SOL-USD RSI > Constant 60 and Position market value (SOL-USD) = Constant 0. Its overall result was true. Read the individual comparisons below, then ask Aurora to explain how they led to the action.
The signal requested 95 percent of buying power at a submitted price of 197.68. 1 captured Filled order shares this timestamp; Aurora receives those fields with the signal.
Inspect the original signal record
View captured signal JSON
{
"eventType": "BuySignal",
"event": {
"eventType": "BuySignal",
"timestamp": "2024-12-31T14:30:00.000Z",
"signals": [
{
"conditionName": "14 Day SOL-USD RSI > Constant 60 and Position market value (SOL-USD) = Constant 0",
"audit": {
"type": "minimal",
"results": {
"0.1": {
"isTrue": true,
"lhsValue": 0,
"rhsValue": 0,
"lhsError": null,
"rhsError": null,
"comparison": "equal"
},
"0.0": {
"isTrue": true,
"lhsValue": 61.53215563468187,
"rhsValue": 60,
"lhsError": null,
"rhsError": null,
"comparison": "greaterThan"
}
},
"failuresOnly": false
},
"isTrue": true,
"actionName": "Buy",
"actionMetadata": {
"buyOrSell": {
"targetAsset": {
"name": "SOL-USD",
"symbol": "SOL-USD",
"type": "Cryptocurrency",
"underlyingSymbol": null,
"optionType": null,
"expirationDate": null,
"strikePrice": null,
"multiplier": null
},
"allocation": {
"type": "percent of buying power",
"amount": 95
},
"price": 197.67999267578125,
"orderType": "Market Order"
}
},
"orderExecution": {
"type": "Market"
}
}
]
},
"timestamp": 1735655400000
}Explore a drawdown period
Show the table · 2 rows, 4 columns
Scroll sideways to compare all columns. Select a heading to sort.
| 2024-01-02T14:30:00.000Z | $10313.32 | $433.50 | $9879.82 |
| 2024-01-26T21:00:00.000Z | $7596.13 | $331.50 | $7264.64 |
No matching rows. Clear the filter to see all records.
Follow the decline from Jan 02, 2024 to Jan 26, 2024. The table retains the recorded portfolio, cash and position values. The engine reported maximum drawdown of 26.35%.
Test another version
Change one rule or choose a different date range, then compare the resulting curve and trade events with this saved experiment. Explore which trades, fees and periods explain the difference.
Exact captured fill fields
2024-03-21T20:00:00.000Z
PairSOL-USD
SideSell
Units0.003478190818314797
Submitted price$176.99
Filled price$176.99
Fee$0.00
2024-03-25T13:30:00.000Z
PairSOL-USD
SideBuy
Units44.413924932613334
Submitted price$186.77
Filled price$186.77
Fee$58.07
2024-03-27T20:00:00.000Z
PairSOL-USD
SideSell
Units44.103027458085045
Submitted price$182.57
Filled price$182.57
Fee$56.36
2024-04-02T13:30:00.000Z
PairSOL-USD
SideSell
Units0.3108974745282893
Submitted price$177.36
Filled price$177.36
Fee$0.39
2024-04-20T20:00:00.000Z
PairSOL-USD
SideBuy
Units52.89928139978486
Submitted price$151.37
Filled price$151.37
Fee$56.05
2024-04-24T20:00:00.000Z
PairSOL-USD
SideSell
Units52.52898642998637
Submitted price$150.29
Filled price$150.29
Fee$55.26
2024-04-25T13:30:00.000Z
PairSOL-USD
SideSell
Units0.3702949697984934
Submitted price$143.69
Filled price$143.69
Fee$0.37
2024-05-03T13:30:00.000Z
PairSOL-USD
SideBuy
Units55.12765658974385
Submitted price$142.30
Filled price$142.30
Fee$54.91
Recorded rows in source order; spacing does not represent elapsed time.
Inspect full UTC times and exact fractional quantities
Scroll sideways to compare all columns. Select a heading to sort.
| 2024-03-21T20:00:00.000Z | SOL-USD | Sell | 0.003478190818314797 | $176.99 | $176.99 | $0.00 |
| 2024-03-25T13:30:00.000Z | SOL-USD | Buy | 44.413924932613334 | $186.77 | $186.77 | $58.07 |
| 2024-03-27T20:00:00.000Z | SOL-USD | Sell | 44.103027458085045 | $182.57 | $182.57 | $56.36 |
| 2024-04-02T13:30:00.000Z | SOL-USD | Sell | 0.3108974745282893 | $177.36 | $177.36 | $0.39 |
| 2024-04-20T20:00:00.000Z | SOL-USD | Buy | 52.89928139978486 | $151.37 | $151.37 | $56.05 |
| 2024-04-24T20:00:00.000Z | SOL-USD | Sell | 52.52898642998637 | $150.29 | $150.29 | $55.26 |
| 2024-04-25T13:30:00.000Z | SOL-USD | Sell | 0.3702949697984934 | $143.69 | $143.69 | $0.37 |
| 2024-05-03T13:30:00.000Z | SOL-USD | Buy | 55.12765658974385 | $142.30 | $142.30 | $54.91 |
No matching rows. Clear the filter to see all records.
Exact drawdown measurement
Read the exact snapshot timestamps and measurement comparison
The largest decline between exported snapshots was 26.35%, from $10313.32 at 2024-01-02T14:30:00.000Z to $7596.13 at 2024-01-26T21:00:00.000Z. The reported maximum drawdown is 26.35%. Explore the trades and holdings around those dates.
No comments yet.