|


INSTALLATION:
- Run the MSBTSetup.exe file after unzipping. This will install MSBT.dll in the "External Function DLLs" folder under your "MetaStock" directory Sample "MetaStock Explorer" formula "TH - Multiple Security Back Test" and indicator "TH-MSBT Equity Plot Example" will also be imported.
- MSBT.exe, MSBT.hlp and Msbt.rep files will be copied into your MetaStock directory.
CREATING AN ASSOCIATION BETWEEN MSBT.REP FILE AND EXCEL OR WORDPAD:
- Find the "Msbt.rep" file in your "MetaStock" directory and left click it once to select it, then while pressing the "Shift" button on your keyboard right click the selected "Msbt.rep" file and select "Open with" from the menu.
- Select "Excel" or "WordPad" from the programs list in the "Open with" dialog, make the "Always use this program to open this type of file" box selected and click "OK".
That's all you have to do for the installation. You can start back testing your ideas now.
USAGE:
Formula : "ExtFml( "MSBT.BackTest", Enter Long, Exit Long, Enter Short, Exit Short)" is the template formula for this add-in, where;
Enter Long : Enter long signal, must be a numerical value greater than zero for entering long position. You can write your formula directly into this space or a variable name or reference to a formula from the "Indicator builder" like "Fml( "My_ Formula")" as you do when referencing other formulas in a formula.
Exit Long : Exit long signal, same rules with "Enter Long".
Enter Short : Enter short signal, same rules with "Enter Long".
Exit Short : Exit short signal, same rules with "Enter Long".
You can modify and use "TH - Multiple Security Back Test" formula or write your own according to above descriptions. In MetaStock Exploer make sure to select "Load" and type the periods as long as you wish in the "Records" edit box, in the "Options" dialog, before you start testing.
When changing trading parameters. Click "Apply" after changing the parameters, click "Cancel" if you don't want the changes you have made.
Important : Make sure the test result (Msbt.rep) file is not open when you start the test, otherwise test will be interrupted, because "Excel" locks the file. In that case, you should repeat the test after closing the Msbt.rep file.
REPORTED RESULTS AND DESCRIPTIONS:
- Ticker : Symbol of the tested security.
- Total Net Profit (%) : Total Profit/Loss realized by the test including closed out values of open positions at the end of the test, if any.
- Percent Profit(%) : Total profit/loss in percent.
- An. Profit (%) : Annualized total Profit/Loss. (Formula: Percent Profit (%) * (365/Days in Test)
- B&H Profit (%) : Profits produced by Long Buy & Hold strategy. If this result is negative, Short Sell & Hold strategy would have profited by this amount.
- An. B&H Profit (%) : Annualized B&H Profit.
- Total Trades : Total closed out trades. This does not include the last open position, if any.
- % Profitable : Percent of profitable trades in all trades.
- Avg. Profit : Average profit per trade. (Excluding any open position value, if there is one at the end)
- Trades Win : Number of total winning trades.
- Trades Loss : Number of total losing trades.
- Long Trades : Number of long trades.
- Winning Long : Number of winning long trades.
- Losing Long : Number of losing long trades.
- % Long Wins : Percentage of winning long trades.
- Short Trades : Number of short trades.
- Winning Short : Number of winning short trades.
- Losing Short : Number of losing short trades.
- % Short Wins : Percentage of winning short trades.
- Cur. Pos : Current position at the end of the test.
- Entry Date : Entry date of the current position at the end of the test, if any. (Date format is your omputer's short date format)
- Bars in : Total number of bars system is in either long or short position.
- Avg. Bars in : Average number of bars in either long or short position.
- Total Win : Total amount of all winning trades excluding the last open position, if any.
- Avg. Win : Average profit of all winning trades.
- Largest Win : The amount of most profitable winning trade.
- Avg. Win. Length : Average number of periods in winning trades.
- Longest Win : Number of periods in longest winning trade.
- Cons. Wins : The largest number of consecutive winning trades.
- Total Loss : Total amount of losing trades excluding the last open position, if any.
- Avg. Loss : Average loss of all losing trades.
- Largest Loss : The amount of least profitable trade.
- Avg. Loss Length : Average number of periods in losing trades.
- Longest Loss : Number of periods in longest losing trade.
- Cons. Losses : The largest number of consecutive losing trades.
- A.Win/A.Loss : Average wins to average losses ratio.
- Close DDown : The largest equity dip relative to initial equity when not in a position.
- Open DDown : The largest equity dip relative to initial equity when in a position.
- Trade DDown : The largest drawdown of a single trade relative to trades entry price.
- P/L Index : Profit/Loss index. Profit/loss ratio.
- Reward/Risk Index : Total Profit/Open DDown ratio
- B&H Index : Buy & Hold index. Total Profit/B&H Profit ratio.
- Com. Paid : Total amount of all commissions paid during the trades excluding last open position's closing commission, if any.
- Int. Earned : Total amount of interests earned when system is not in a position.
- Bars in Test : Periods in test.
- Days in Test : Total number of days in test. (Should be higher than or equal to "Bars in Test" because of the holidays and weekends)
- First Date : Test begin date (First bar's date). (Date format is your computer's short date format)
- Last Date : Test end date (Last bar's date). (Date format is your computer's short date format)
- S. Loss (%) : Stop-Loss given in formula as a parameter.
- Coms. (%) : Entry-Exit Commission given in formula as a parameter.
- Int. R. (%) : Interest Rate given in formula as parameter.
- Init. Eq. : Initial Equity = 100. Fixed value.
- Security Name : Name of the tested security.
TIPS & TRICKS:
*** You can ignore some parameters by just writing "0" (zero, without the quotes) into their spaces. For instance; if you want to test long positions only with no "Stop-Loss", write your formula like the one below:
ExtFml("MSBT.BackTest", Enter Long, Exit Long, 0, 0)
And replace the "Enter Long", "Exit Long" with the formulas you want to back test.
*** You can write "1"s for the Entry and Exit signal parameters you wish to produce Entry or Exit or both signals on every bar.
*** You may use variables or formula references instead of writing formulas directly into Entry and Exit parameter spaces. See the sample below:
BL:= Ref(C,1) > C;
SL:= Ref(C,1) < C;
ES:= Ref(C,1) > C;
ExtFml( "MSBT.BackTest", BL , SL , Fml( "TH-Enter Short") , ES)
*** If you want to paste the formula template into formula space, follow the steps below:
Click "Functions" while the cursor is in the formula writing area.
In the "Paste Functions" dialog, make "Paste Arguments" and "Show English Names" selected by clicking them.
Find "MSBT" in the "Function category" list, click it, and click "Back Test" in the "Paste Function" list and click "OK".
*** Parameters are separated by commas, not by spaces, don't delete the commas between parameters, otherwise "MetaStock Explorer" thinks some parameters are missing and you will be prompted to enter more parameters.
Need more help? Please do not hesitate to ask me.
UPDATES:
25 February 2002: Version 3.0
- Setup program to ease installation.
- Profit Target stop is added.
- "Trading Options" dialog can be reachable from MetaStock "Tools" menu and will not show up before every test if you don't want to change settings.
- Commissions and Stops can be set in "points" as well as "percent".
- Ticker column in Msbt.rep file can display symbols up to 8 characters (it was 6 before).
- Test results can be displayed automatically after every back test.
- Help documentation added and can be reached from MetaStock "Help" menu or from "MSBT Trading Options" dialogs.
- Notes for the test can be added automatically into reports.
- From now on, unique registration keys will be required for every user.
15 August 01: Version 2.2
- A bug fixed in "Days in Test" result (Former version was reporting one day less)
- New feature adds formula name to the title.
- Security symbols are left aligned, making it possible to sort them with Excel.
11 July 01: Version 2.1
- A bug fixed in "Fixed Equity" test.
- "% Long Wins" and "% Short Wins" columns (Percentage of winning Long/Short trades) added.
07 July 01: Version 2.0
- Calculation formulas for index columns are changed.
- Few more columns added to MSBT report.
- MSBT Report file extension changed from .rpt to .rep, so, if you are using eSignal, it will not cause file association problems.
- Test date and time added to report.
- A dialog has been added for selecting trading parameters. With that dialog you are able to:
- select entry and exit prices,
- select entry and exit delays,
- define initial equity amount,
- use fixed equity for all trades.
- define entry and exit commissions independently.
- Click here for a screenshot of the trading parameters dialog.
11 June 01 : Version 1.1
- Avg. Profit, First Date, Last Date columns added.
- Fixed a minor bug, causing profit calculation error if there is an open short position at the end.
- Changed the date format from DD-MM-YYYY to users computer's short date format. Now you can change the reported date format by changing your computer's short date format (It is in the "Date" tab when you open the "Regional Settings" in "Control Panel")
|
|