The Examples folder (C:\Program Files\Realtest\Examples by default) contains the following sample scripts:
•actual_trades.rts - shows how to "test" a list of actual trades using an Imported Trade List file
•actual_entries.rts - shows how to experiment with alternative rules using a list of actual trade entries
•bensdorp_book.rts - an implementation of the strategies described in Automated Stock Trading Systems by Laurens Bensdorp
•bensdorp_book_tweaked.rts - same as above with a few minor changes to improve performance
•breadth.rts - illustrates use of cross-sectional formulas in the Data Section to calculate and chart market a breadth indicator
•combined.rts - demonstrates how to combine strategies that use different symbol universes
•combined_multi_bar_size.rts - shows how strategies in a script can each use their own bar size and refer to external bar sizes
•dividend_capture.rts - shows how to use Norgate dividend data and a slightly unusual approach to capturing dividends
•djia_earnings.rts - an example of how to use an Event List File to include earnings dates in your imported data
•djia_make_syminfo.rts - shows how to create a Symbol Information File with Norgate metadata for use with other data sources
•djia_make_syminfo.rts - shows how to use a symbol information file to add metadata to a Yahoo import
•es_compare.rts - using Norgate futures data, tests buy and hold of two continuous contract series (adjusted and unadjusted) vs. rolling through each individual contract
•gc_kelly.rts - demonstrates how to model Kelly Criterion position sizing using a simple trend-following strategy for gold futures
•ibd_rs.rts - shows how to calculate IBD's relative strength ranks for any universe of stocks
•import_csv.rts - a hypothetical example of how to specify CSV data import (data not provided)
•import_ms.rts - a hypothetical example of how to specify MetaStock data import (data not provided)
•import_multi.rts - an example of how to combine data from multiple sources into a single RTD file
•import_norgate.rts - shows how to import data directly from Norgate NDU, and how to access Norgate's index constituency data
•import_spx.rts - shows how to import all the SPX components from Yahoo (see Tutorial 3)
•index_breadth.rts - shows the best way to calculate breadth statistics using only historical index constituents each day
•industry_indices.rts - shows how to use Norgate's "Corresponding Industry Index" features to know the industry relative strength of any stock
•keltner_pullback.rts - a pullback-after-momentum strategy based on the work of Adam Grimes, uses risk-based position sizing
•martingale.rts - shows how to implement pyramiding within a single strategy
•mr_sample.rts - presents a somewhat sophisticated long/short mean-reversion strategy pair using Norgate data (and an example of "tail risk" in January 2021)
•mr_sample_debug.rts - demonstrates use of strategy debugging formulas to look under the hood of a running test, and also demonstrates the usefulness of the Library script section
•mr_sample_cash.rts - adds a strategy to the MR long/short pair to sweep unused capital into a "cash equivalent" ETF
•mr_sample_common.rts - contains the common elements of the following three examples, each of which includes this script
•mr_sample_benchmark.rts - adds a benchmark strategy to the mr_sample example
•mr_sample_hedged.rts - adds an index ETF hedge to the mr_sample strategy pair
•mr_sample_orders_alera.rts - shows how to configure the strategy pair for daily Alera Portfolio Manager signal file generation
•mr_sample_orders_basket.rts - shows how to configure the strategy pair for daily IB Basket Trader order file generation
•mr_sample_scan.rts - demonstrates a possible Daily Setups Scan that could be used with the mr_sample strategy pair
•mr_sample_scan_basket.rts - shows how to configure a scan to create an IB Basket Trader CSV file
•mr_sample_test_scan.rts - shows how to run a test+scan to generate a set of daily orders
•mr_sample_tracking.rts - shows how to test a strategy that only takes trades when its own equity curve is above a moving average (avoided above mentioned "tail risk"...)
•mr_sample_tracking_alloc.rts - shows how to test a strategy that reduces its allocation when its drawdown increases
•multi_filter_scan.rts - shows how to write a scan that creates multiple rows per symbol per date with different data in them
•ndx_rotate.rts - a simple momentum-based rotational strategy using Nasdaq 100 component stocks
•nick_day_trade.rts - implements the Nick Radge long-only "day trading strategy" (MOC exits)
•sample_scan.rts - introduces the Data section and the scanner (see Tutorial 3)
•sample1.rts - simple moving average crossover strategy for SPY (see Tutorial 1)
•sample2.rts - a parameterized version of sample1, allowing for optimization (see Tutorial 2)
•sample2a.rts - a three-parameter version of sample2, also used in the same tutorial
•sector_efts.rts - implements a monthly rotational strategy for the S&P 500 sector ETFs (see Tutorial 4)
•spy_tlt_uis.rts - demonstrates using Walk-Forward optimization to implement a SPY/TLT strategy from an article
•stockbee_mm.rts - calculates current and historical values for all of the "Stockbee Market Monitor" breadth indicators
•trail_half.rts - shows how to divide a strategy into two half-allocation strategies to implement "take half off at a target and trail the rest"
•turtles.rts - an approximation of the original "Turtles" futures system, as documented by Curtis Faith
•vigilant_asset_allocation.rts - implements the Keller and Keuning monthly ETF rotational strategy
•weekly_trend_following.rts - a weekly Russell 1000 trend-following strategy similar to the Nick Radge "Weekend Trend Trader"
•zigzag.rts - shows how to calculate "Zig", "Peak" and "Trough" indicators by using Self-Referential Data Items
The Examples folder also contains the following other files:
•actual_trade_symbols.txt - the symbol list used in the actual_trades.rts example to import data from Yahoo
•actual_trades.csv - the list of trades used in the actual_trades.rts example
•actual_entries.csv - the same list as above with the exit information removed
•djia_earnings.csv - a sample list of earnings dates for the DJIA components since 1/1/2019 (not guaranteed to be accurate)
•djia_info.csv - a detailed symbol information metadata file for the DJIA components
•djia_syms.txt - symbols of the current DJIA components
•exclude.txt - a general-purpose ExcludeList file used to exclude redundant symbols (e.g. GOOG vs. GOOGL) etc. during Import
•holidays.txt - example HolidayList file, to facilitate order list generation for weekly or monthly strategies
•ib_basket_template.csv - order list template file for IB Basket Trader output format
•nick_api_template.csv - order list template file for "The Chartist Smart API" (Nick Radge) output format
•spx_syminfo.csv - the company and industry names of the current S&P 500 components, used for Yahoo import examples
•spx_syms.txt - symbols of the current S&P 500 components
|