FAQ

Top  Previous  Next

 

FAQ

Q: How do I initiate parameter stepping in Mechanica?

A: First, put this line at the top of your batch.sig file:

STEPPING=ON

 

Mechanica will check to see if you actually have stepping code in any of the SIG and/or SIZ files called from within this batch.SIG file.

You can have any number of instances of {stepping} code throughout any or all of your SIG and/or SIZ files.

Multiple instances of {stepping code} are nested so that if, for example, it finds 3 stepping instances requiring 3 steps, 12 steps, 9 steps, And your batch file specifies stepping=on, Mechanica will make 3*12*9 = 324 passes of the entire batch process displaying row-by-row results in a window as progress continues. Once the Stepping window is displayed a progress counter shows how many passes still remain for the stepping operation to complete.

Second and subsequent passes will most likely run significantly faster than the first pass.

You Must call a SIZ file from within your batch.SIG file in order for stepping results to display.

Q: How do I modify my individual SIG or SIZ files to make stepping happen?

A: Syntax: {Default, Start, End, Step}

MEMORY[1] = {70, 5, 90, 3}

COL23 = {70, 5, 90, 3}

 

Default to a value of 70 when I'm not doing a stepping exercise when running this code in the future.

Start this stepping process with a value of 5. End this process with a value of 90. Step (increment) the value assigned by 3

MEMORY[1] = {.7, .5, 2.7, .1}

 

Syntax: STOC[{Default, Start ,End ,Step}, {Default, Start ,End ,Step}]

COL1 = STOC{{30, 10, 250 ,10}{90, 80, 330, 30}'multi parameter step

COL1 = STOC{{30, 10, 250 ,10}, 90] 'single parameter step

 

Syntax: ATR[{Default, Start ,End ,Step}]

COL1 = ATR[{30, 10 ,80 ,2}]

 

Syntax: {Default, Start, End, Step}

NEWCONTRACTS = ({.015, .015, .025, .001} * TOTALEQUITY)/NEWRISK

 

 

Q: Is there a limit to how many instances of stepping code I can have in my SIG and\or SIZ files?

A: No. But remember that the number of steps required by your code is multiplicative for each instance.

Q: After a stepping run completes how do I know which step parameters generated the results on, say, row 9 of the results window?

A: Clicking on any row (right side window) will bring up, in the Left side window, the step values which were current when that row's results were generated.

Q: How do I sort the results window by column?

A: Click on the column header once for ascending sort, twice for descending sort.

Q: Can I run stepping with SIMULTEST=ON?

A: Yes

Q: Can I do date-wise stepping?

A: Yes. In your *Sizing* code you can say:

STARTDATE = {19980101, 19910101, 20000101, DAY} 'reminiscent of TR's Worst Case Analysis

STARTDATE = {19980101, 19910101, 20000101, WEEK}

STARTDATE = {19980101, 19910101, 20000101, MONTH}

STARTDATE = {19980101, 19910101, 20000101, YEAR}

 

Q: How do I cancel a stepping operation once it starts?

A: Click the red X. You will be prompted Yes to Cancel, No to continue.

Q: Is there a way to pause the stepping run without cancelling it?

A: Yes. Click the Red X, Then when you are ready to resume the run click No (Don't cancel).

Q: How do I save my stepping results for later examination?

A: Two ways. Click the diskette icon on the Stepping Detail window to launch the file save dialog. Several files will be saved to \My Documents\Mechanica\Stepping. YourFile.csv can of course be opened in Excel. The others are for later reloading into Mechanica's stepping window.

Q: How do I reload previously saved results?

A: Open the Stepping Detail window by clicking on the stepping icon on Mechanica's toolbar. Click the open file (folder) icon on the stepping window toolbar. Note doing so reloads a database file from Mechanica\Stepping with extension .isd. It dos not load the .csv file which also resides there.

Q: I don't see a toolbar icon and the stepping window is closed. How do I open the stepping window?

A: If you don't see the stepping icon on Mechanica's toolbar do this: Close Mechanica. Delete Mechanica\MecAtbLayout.atb.    When you reopen Mechanica you will see a new toolbar icon that lets you open the stepping window.

Q: How do I tell which parameters generated which results for a particular row when viewing a previously saved .csv file in Excel?

A: Parameters for each row are located in the first few cells of each row.

Q: Is there a quick way to scan stepping window data by row while also observing the parameter values?

A: Click a row on the right side screen then use Up, Dn, PgUp, PgDn Arrow keys to navigate through the results.

Q: I do ranking operations in separate SIG files. It would save time if these files were only processed once per stepping session. How can that be done?

A: In most cases Mechanica correctly determines which file(s) need to be processed on second and subsequent passes.  In instances where it unnecessarily processes a particular file that should be skipped you can force one-time-only processing by preceding the file call in your batch file with PROCESSONCE:

PROCESSONCE

ForexConversion.sig

PROCESSONCE

RankFile.sig

PROCESSONCE

DataChecker.sig

 

Q: Is it ever possible for Mechanica to process only once a file that should be processed on every pass?

A: Though it is fairly unusual there is an instance where Mechanica Should process a file on each pass but does not. Internally the rule regarding .SIZ files is this. Any .SIZ file EXCEPT the last one called will be ignored on second and subsequent passes. So if your batch process calls multiple .SIZ files and you want one(s) other than the last one to be processed on each pass you will need to precede those batch calls with PROCESSEVERY:

MySize1.siz 'process only on first pass

PROCESSEVERY 

MySize2.siz 'process on each pass

MySize3.siz 'process only on first pass

NEXTSTEP

Portfolio.siz 'Last .siz called is automatically processed on every pass

 

Q: I have the following code in several SIG files. COL1 = MAX[H, 30, 0].  Is there a way to step the '30' value so that it increments the same in all SIG files for each stepping pass?

A: Yes. You'll need to step a variable that all your SIG files can reference. First be sure you have a GBL file resident. Add a SIG file with code something like this. GBL[21] = {30, 10, 50, 5}

If there is no stepping code in the SIG files that references the common GBL variable you'll need to precede each call with PROCESSEVERY.

Your batch file will look something like this:

GBLFile.sig

PROCESSEVERY

File1.sig

PROCESSEVERY

File2.sig.

NEXTSTEP

Portfolio.siz 

 

Your 2 SIG files will include code like this:

X = GBL[21] 'retrieve the common stepped value. X remains constant for each pass

COL1 = MAX[H, X, 0] 'Use X in the MAX function