How r.Virgeel is trained

Following the requests coming from some users that were initially confused about how to interpret the signals coming out from r.Virgeel, I think that nothing is better than to explain how the indicators are produced. I have never done it before so extensively.

The process is very different from the calculations for a technical indicator as RSI or MACD, which involves the direct extraction of values from the price historical data.

Using neural networks follows a different logic: what to I want to know?  Think to a medical sample: doctor, I have these symptoms, which is the disease? Ideally, if I have a database of symptoms associated to various diseases, querying the database can give an easily probable range of possibilities, if not the correct reply. This happens now in many major hospitals around the world.

If you have ever used a spreadsheet (who doesn’t?), think to a table made of columns of homogeneous data, each line a single “experience”. You may add one or more columns and associate to each experience a characteristic, a category, a value, a disease, something that give sense to the line of data.  Great, you have created an a.i. model. It is a table, where some columns are input data that represent an event or an experience, and other columns that represent a meaning that we want to associate to each event or experience.

Usually, by habit, input columns are placed left in the spreadsheet and associated values are placed right.

r.Virgeel left columns does NOT include any data from the S&P 500 index. All the inputs come from dozens of other market indices, that covers all main stock markets, commodities, forex, metals, yields, bonds, etc.

I may say that r.Virgeel evaluates the S&P 500 as a consequence of all other markets. The influence of each market is directly related to its dimension, so the bond market and the forex are the most relevant.

At the moment the daily model has 74 indices on the input side and the weekly model has 123 inputs on the input side.

At this point, how the r.Virgeel indicators are built? What is placed in the right side columns?

I will cover the main indicators, the rv.Stop, rv.Target, rv.Position and rv.Signal indicators.

First, the market action is broken in “positions”, either long and short. Here you may see a sample of a long position, from the training program. This code is one of the three legs that support r.Virgeel (the others being the data maintenance and the number cruncher): here is where the “experience” is transferred into the model.


The position is marked by the thick white line.

rv.Stop (red dots) is placed to accommodate the whole movement. This is a traditional stop, a value that, if perforated, does invalidate the position.

rv.Target is calculated from the highest high and from the highest close of the final bar of the position.

Two series of signals are placed at significant bars (let’s call them “arrows”): the rv.Position puts arrows at the first and second bar of the move, to mark the entry points, and at the second-last and at the last bar, to mark the close of the position. Then it marks all the other bars of the position with a “Stay long” marker.
The same signals are placed in the rv.Signal indicator, except for the “Stay long” markers, plus other arrows are placed at meaningful bars, to highlight minor corrective movements and new entry points available, as the main position is holding.

These four indicators work in accord almost always. Almost. When they point in different directions, it’s a nice warning that something crucial is happening. Big attention is suggested then. After recent improvements, it seems that indecision/uncertainty usually last one/two bars, then r.Virgeel returns under normal conditions.

In the background, you may see coded the rv.PosColor: bright red at major long entry points, bright red at major short entry points, a gradient in between. It is a confirming tool.

All indicators are calculated separately and r.Virgeel is totally unaware of its own past outputs. Every time it produces an output, let’s call it a forecast or a diagnosis, it evaluates present values on the left side against the archive of experiences it has recorded. It is called PatternRecognition and is produced by applying a reverse logic algorithm. The less improbable result is output.

This is how neural networks work. Now you may understand better when I’ve written “A.I. is different“, it has nothing to do with technical analysis by any means.

One recent improvement has been the introduction of the FastTrack indicator. It is the first indicator that has been suggested directly by r.Virgeel. The model has a strange behaviour, probably depending on the fact that I’m not a mathematician I cannot explain it, that produces exaggerated forecasts under defined conditions. Leveraging on this defect, I verified extensively that the output was a fantastic trend follower: false signals are near to nil, considering that even if when they occur, usually you may return on the correct side with a minimum loss.  The FastTrack output is a series of four levels. What matters are the two levels that define the central neutrality area.

Let’s make an example. Today’s D-FT (Daily FastTrack) is the sequence 2837.79, 2797.362 | 2808.145, 2788.749

  • The ordered sequence is 2837.79, 2808.145, 2797.362,  2788.749
  • The central neutrality area is defined by the numbers 2808.145, 2797.362
  • Above 2808.145, we have confirmation of a rising dynamic under development,
  • Under 2797.362, we should have confirmed of a declining action under development.

The FastTrack is an end of day indicator, it is very sensible and I find it useful placed on the short term intraday real-time chart. Actually, using the r.Virgeel’s framework, the D-FT levels, some rudiments of Elliott’s Wave’s theory and a couple of moving averages seems a good setup. I’m testing it at the moment with a certain satisfaction and I will report the experience when it will be mature. Simply said, I’m moving the first steps towards a wealth building machine, using intraday action, based on a weekly staircase. Each week target is based on a stable compound capitalization model. In a few month I will go bankrupt (on the CFD account) or the machine will be snorting and puffing and chugging.

r.Virgeel’s indicators somehow mimic some traditional t.a. indicators and this may generate confusion or misunderstanding. It’s my fault: as the model construction has developed, I’ve got from my previous experience of investor and trading scholar, fishing ideas trying to shape r.Virgeel. Many indicators have been developed and few survived.  Some brilliant ideas have been demonstrated them dumb, others have a long track of solidity and sharpness. The quest is not over.