Snapshots

Modified on 2017/08/30 10:46 by Eugene — Categorized as: Visualizers

What is it?

The purpose of this new visualizer called "Snapshots" is to collect backtesting results and code in a file, which then can be examined at any time by re-opening this Strategy's window. Snapshots is part of the MS123 Performance Visualizers library.

Every time you save a Strategy that contains changes, Wealth-Lab will automatically take a snapshot that contains:


Snapshots are stored as disk files and include version number, starting from zero. Snapshots cannot be saved for Strategies on mapped network drives. When a Strategy is opened, all its snapshots will appear in a tree view. To save your first snapshot, strike Ctrl-S.

Think of "Snapshots" as an automatic backup feature for your Strategies. As you make additions and corrections to the code and execute it again and again, saving code with Ctrl-S, you can be sure that intermediate changes won't be lost as rollback is possible at any time. NOTE: if you haven't made any changes to the code, snapshot will NOT be saved.

Features


Version tree

The Version tree on the left lists all saved snapshots. Click on a version number to load a saved snapshot of the strategy. From right-click menu, you can delete one or all snapshots by the strategy, copy code to clipboard, or open this document.

Strategy Code

This tab shows saved strategy code. For your convenience, it highlights keywords like the built-in Editor.

Code snapshot

Code snapshot


Code is saved only for code- and rule-based strategies; Combination strategies and compiled Strategy libraries are not supported.

Code Compare

Code revisions can easily be compared after selecting different versions from Version dropdowns. Detected changes are highlighted with green/red stripes. If your code is long enough, you can scroll it down - it's synchronized.

Compare code revisions

Compare code revisions


Note: Through right-click context menu, both Strategy Code and Code Compare allow changing font size and copying the code of currently selected snapshot to the clipboard.

Equity

To minimize snapshot size and memory usage, equity for intraday backtests is always compressed to a single value per day (end-of-day) before saving. The Buy&Hold curve's visiblity can be turned on or off from right-click context menu.

Strategy equity snapshot

Strategy equity snapshot


Compressed intraday equity snapshot

Compressed intraday equity snapshot


Performance

To avoid performance overhead, Snapshots include only a minimal, lightweight subset of key performance metrics for "All Trades". Consequently, neither Long/Short nor Buy&Hold results are stored. Nevertheless, this is perfectly enough to quickly evaluate backtest results and compare performance. Additionally, the position sizing/data loading settings applied are stored and displayed on the status bar of Snapshots > Performance results.

Performance snapshot

Performance snapshot


Technical facts





  1. Syntax Highlighting in RichTextBox Control (c) Duncan Harris
  2. Generic Diff Algorithm (c) Michael Potter
  3. FastJSON v2.013 (c) Mehdi Gholam