Strategy testing system
Test before you invest


 

 
  Home Downloads Licensing Contact

 

Back Testing

TekView uses a fuzzy logic inference engine to evaluate and combine sets of decision rules into a buy/sell signal.  A set of rule is called a strategy.  During back testing the signals from the currently active strategy is used to automatically generate transactions in the currently active portfolio.  Users can back test a single symbol or back test all of the symbols in the follow list.

The fuzzy logic inference process involves these steps:

                1) Fuzzify a crisp input into fuzzy function memberships.
                2) Calculate values for the series of union and intersections expressed by the rule’s logic.
                3) Derive and return a crisp output from the results of step 2.

 

Step 1 - Fuzzification

 

Indicator data series provide the crisp inputs which are characterized using the Fuzzy Set Editor.  In the example shown below the values from the data series "MoneyFlow" are characterized by three functions: High, Medium and Low.  A crisp value has a degree of membership, ranging from 0 to 1.0, in each of the functions.  The shape of the function determines the membership.

 

 

 

 

A graphic modeling technique known as a Petri net is used to express strategies.  The example to the left is a portion of a net showing inputs and outputs of the fuzzy set shown above

 

 

Step 2 - Evaluation

Fuzzy logic rules take the form of IF x THEN y statements where the x condition is known as the antecedent and the y as the consequence.  An example that mimics the buy/sell rules of a moving average crossover might be:

               IF MACD Is Positive THEN Signal Is Buy.

Further, the antecedent can express multiple conditions.  For example:

                IF MACD Is Low AND MACDh Is Positive AND NOT Stochastic %K Is Low THEN Signal Is Buy

The combining of the function memberships in the antecedent (unions and intersections) results in the confidence (or strength) of the consequence.  The example below shows how data from stochastic oscillators might be combined.  The confidence in individual consequences (i.e "Stochastic %K is Positive") are combined by fuzzy operators to produce a confidence in the combined statements (i.e. "Stochastic %K is Positive AND Stochastic %Ds is Low AND Stochastic Signal is Positive") which is the strength of the Buy/Sell signals.

 

Step 3 - Defuzzification

In the final step the results of the fuzzy combinations are converted back to a "crisp" number in a process called defuzzification.  This process is essentially the reverse of the fuzzification process described above.

 

Viewing Results

During back testing transactions are automatically generated based on the signal from the strategy.  The trades can be viewed on the charts and positions summaries from the Portfolio.  TekView will also plot the buy/sell signal of multiple strategies in the indicator charts which helps to identify strategies that might compliment one another.  Notice the plots in the bottom two charts in the graphic below.

 

Strategies can be embedded in other strategies thus allowing complimentary strategies to be treated as a single strategy.   The example below shows how a strategy based on stochastics might be combined with one based on money flow into a single strategy.  Notice the use of In and Out sockets to easily integrate sub-strategies.

 

 

Home    Previous    Next