StockQP Analytics v1.0 Manual
Copyright © 2006 Rubicite
Interactive
Table of Contents:
1 - Introduction to StockQP Analytics
StockQP Analytics is an advanced and
specialized research tool. It has existed in several forms for more than half
a decade, having been used exclusively in research capacities with significant
success. It is designed and built around one important question.
"If a stock is down X consecutive days
and Z percent over those days, should you buy and hold for Y days?"
This question may be better described as a
mathematical theory. It is as follows: Given company C with market cap ~$100
billion whose stock goes down a significant percentage on any arbitrary day of
trading, it is more likely to go up than down over the following days of
trading.
The most
straightforward explanation for this is:
"If a highly-valued company is going to
'stick around' for the foreseeable future and remain somewhere in the
neighborhood of its current market cap and its stock price drops a significant
percentage, it is more likely than not to rebound than it is to continue
decreasing."
This may seem counter-intuitive because
the generally accepted idea is that the market is completely chaotic. Many
believe that on any given day, any arbitrary stock is as likely to go up as it
is to go down. However, the logic in the following paragraph may serve to
convince one otherwise.
"Given that a company C is going to
survive and maintain a significant market share, then it can be considered
impossible that its value will reach or even approach zero. In fact, the
closer its stock price gets to zero, given roughly the same market cap and
market share, the more out-of-whack its P/E ratio becomes. In order to
maintain a relatively market-acceptable P/E ratio, the stock is going to tend
to go upwards after a downward drop. In general, the closer company's stock
comes to zero, the more likely it is to rebound.?
StockQP Analytics analyzes two decades of
stock data in order to produce a percentage of profitability given certain
market conditions for certain symbols. In the following sections, detailed
examples will be provided showing the power and usefulness of StockQP
Analytics.
2 - Why Use StockQP Analytics?
StockQP Analytics is an excellent tool for
two types of traders. The program is powerful enough to be used as the engine
for various trading strategies. In the professional version, its command line
runnability can be harnessed by a wrapper program which actively monitors
market conditions and uses StockQP to help identify ideal conditions to get
into and out of the market. Short Term traders may find the program extremely
useful in backing up their own research and trading methods.
2.1 Research Tool for Short Term Traders
StockQP Analytics is an ideal tool for
Short Term Traders (day traders who don't
mine holding a position for a few days). Most short term traders use a
combination of research, media monitoring, other technical analysis, and
intuition to determine the correct times buy and sell a stock. If a trader
determines that he has a 55% chance of making a profit on a particular trade,
but StockQP tells him that he has only a 42% chance of making a profit, he may
want to consider otherwise. StockQP analyzes historical data. It identifies
similar conditions for the symbol in question (and perhaps other symbols that
act in a similar fashion) and determines if buying and holding this stock is a
profitable endeavor in the long run when this particular condition is met.
Example 2.1 may provide further insight:
On August 1st, 2006 a trader
is interested in purchasing 25,000 shares of CIEN, expecting a rebound in 1 or
2 days due to a recent drop in its price. In this hypothetical situation, the
trader sees that the stock has been down for 3 consecutive days and is down 8
percent over those days. The trader has also determined that CIEN, JDSU, and
FNSR usually seem to fluctuate in a similar pattern (as is common among
symbols within the same sector). The trader provides the following inputs to
StockQP Analytics:
|
Days Down: |
3 |
|
Percent Down: |
8 |
|
Days to Hold: |
2 |
|
Amount to Invest: |
$90,000
|
|
Symbols: |
CIEN, JDSU, FNSR |
These inputs instruct StockQP Analytics to search
for any conditions that meet ?A stock is down 3 consecutive days and 8 percent
over those days?. It then simulates a purchase of CIEN, JDSU, FNSR when these
conditions are met, holding the position for exactly 2 days and selling. The
trader also specifies the range of historical quotes to search
through:
|
Start Date: |
01/01/89 |
|
Finish date: |
08/01/06 |
StockQP Analytics will search through all quotes
for the listed symbols that fall within this range and provide the appropriate
statistics afterwards. StockQP reports that these conditions have been met 534
times for these symbols. 276 trades resulted in an average profit of 8.38%
while 246 trades resulted in an average loss of 6.48%. The expected outcome of
buying CIEN now and holding for 2 days, as estimated by StockQP Analytics, is a 1.34%
profit (or ~$1,200).
Example 2.1 provides a great example of
the usefulness of StockQP Analytics as a research tool to aid short term
traders. Spending only seconds in StockQP can give a trader a big advantage
over other traders and provides another great source of information about
the strength of a potential position in the market.
The following image should interest
potential and existing users of StockQP Analytics.

In the image, the red line represents a composite value that gives a good
representation of 3 symbols, YHOO, CNET, and PCLN. Stocks were purchased when
they were down for 3 consecutive days, 4 percent over those days, and held for 2
days. It is amazing to many that such a trading scheme could hold up so well
despite such a market crash (in late 2000).
2.2 Stand-Alone Tool for Identifying Ideal Market Conditions
StockQP Analytics is powerful enough to be
used as an engine at the core of a trading strategy. The strategy in section
2.1 was to use StockQP to determine if the current conditions for a potential
position are favorable. In this section, it is shown how StockQP can be used
to identify the most profitable conditions for all symbols,
market-wide.
This can be done by writing a wrapper
program or script that uses StockQP as a slave. In slave-mode, StockQP is
executed via the command line. Example 2.2 provides the general design of such
a trading system.
After the market is closed on a trading
day, a trader fires up his trading program which uses StockQP in slave mode.
For the sake of simplicity, we'll say this trader is only interested in
trading in semiconductor stocks.
-
The trader identifies a list of stocks
in the semiconductor industry which go up and down in value in a similar
fashion. For the sake of simplicity, we'll say he chose only INTC, AMD,
MU.
-
The next step it to determine how far
back in history to have StockQP to analyze for profitable conditions. The
trader decides that the three stocks have been trading in a similar
fashion since 1998, so he chooses 1/1/98 through present day as his
range.
-
Next, the trader sets up the wrapper
program to track the results of different combinations of X, Y, and Z
values over the range of dates and symbols selected in the previous steps.
(where X is days down, Y is days to hold, and Z is percent down).
-
The next step is to sort the different
combinations of X, Y, and Z to determine which are most profitable.
-
The last step is implementation
specific. It is the trade system administrator's duty to interpret these
results in the most profitable fashion.
In our example, we'll say StockQP, in step 4, returned these following three
conditions as the most profitable:
-
Stock is down 2 days, 8 percent, hold for 1
day 55.3% with 120 trades
-
Stock is down 1 day, 7 percent, hold for 2
days 54.9% with 99 trades
-
Stock is down 3 days, 7 percent, hold for 1
day 53.2% with 412 trades
The trader has decided to take these top three results, and execute a trade on
INTC, AMD, or MU if the current market conditions match any of the conditions
just listed. In this type of trading strategy, the trader might not even look at
news or vital statistics about the stocks. How can somebody trust a program that
says when to get into the market? The next chapter gives some important insight.
3 - How accurate are the statistics?
This is the most important question to consider when formulating a trading
system or analyzing a research tool for short-term traders. StockQP analyzes
historical data and determines which conditions were most profitable over the
long haul. In a way, StockQP ignores news, hype, and earnings because these
things are not included in the database. However, if you look at it another way,
StockQP considers everything there is to consider about stocks. Since the
program considers thousands upon thousands of quotes, it encounters earning
situations, good news situations, bad new situations, bull markets, and bear
markets time and time again. Any and all of these situations are factored into
the statistics reported by StockQP.
This brings us back to the primary question. How accurate are the statistics?
While Rubicite Interactive offers no guarantee as to the accuracy of the
statistics reported, the author has seen good results. Though it is a nontrivial
task, writing a simulator (as seen below) can analyze and determine the accuracy
of StockQP's predictions. The general design for such a simulator is listed
below:
Writing a Simulator
-
For every day of 2006, starting on January 1st
-
For each sector in the list of sectors
-
Determine optimal trading conditions based upon the previous 5
years of trading for this sector (2001 -> Current Day)
-
Analyze the market conditions on this day of trading
-
See if any of the current market conditions match a 'profitable
condition' found for any symbol in any sector
-
Purchase any stocks that match profitable conditions, and hold them
for the predetermined amount of time.
-
Track statistics about how accurate StockQP
Analytics' predictions actually
were.
-
Display overall statistics about the accuracy of StockQP
Analytics' predictions.
Scoring System
There exist many ways to implement such a simulator. For example, if there are
150 combinations of X, Y, Z conditions being analyzed for each sector on each
day, how many should be selected for active trading? If the top 3 are taken,
fewer trades will be executed due to the rarity of such events. If the top 20
are taken, many trades will be executed, but profitability may suffer due to too
many bad conditions being selected. Balance must be achieved. In fact, the
author of StockQP suggests a weighted scoring system for X, Y, Z conditions based
upon: number of trades a condition yielded historically, the percentage of
profitability, the average gain per profitable trade vs. the average loss per
unprofitable trade, and the overall exposure of the bankroll.
What does a simulator tell us?
The results from the simulator can give a good indication of the predicted
chance of profitability vs. the actual profitability. Again, it should be stated
that no two implementations of such a simulator will be the same due to many,
many variables which must be set during development. However, despite these many
variables, it can be seen that the 5 years previous to 2005 can be used to
predict with some accuracy the movement of stocks in 2005. It really goes back
to the discussion in the Introduction... As high market-cap companies approach
zero, they are more likely to bounce back in order to maintain a
market-acceptable P/E ratio.
What kind of results are we looking at (For a
trading system)?
StockQP's best results are going to be high-volume conditions yielding a 52% to
55% chance of profitability. This means that nearly half of the time, trades
will result in losses or no gain when StockQP is used as the only tool for
determining if a trade should happen. However, when StockQP is used at the core
of a trading system, a bankroll management system which utilizes chunks of size
2 to 20 percent of the overall bankroll to execute trades is going to be much
more successful in the long run. It's like being a card counter at a blackjack
table. Their goal is to hit that 51% chance of profitability over and over.
However, they don't use their entire bankroll. These use chunks as mentioned
previously. They realize that despite their greater than 50% chance of
profitability, they still have a significant chance of losing money on every
hand. As card counters say, "We want the law of large numbers to take over". If
your sample size is great enough, you should end up making a profit. This brings
us back to StockQP. If we're given a 54% chance of profitability on a trade, a
trading system that bets the entire bankroll is sure to fail and fail fast.
Bankroll management will be discussed further in the Strategy Chapter 5.
What kind of results are we looking at (For
Short-Term Traders)?
StockQP
is going to return results like "52% chance of profitability on the next trade".
Typical percentages are in the range of 45% to 55% on high-volume conditions
(conditions that happen often). These percentages take everything into account.
So, used in conjunction with other research, market analysis, and good
intuition, it should serve to increase profitability. If a trader is still
undecided about whether or not to make a trade, but StockQP is saying that
historically there is a 55% profitability rate for such a condition, it may be
wise to invest. On the other hand, StockQP can serve warnings to people in the
same situation. A 42% chance of profitability would not seem very appetizing,
even if the trader 'has a good feeling'. That's a pretty low rate of
profitability in the long run! The primary goal of this implementation of
StockQP is to serve as a tool for short-term traders to aid them in making
decisions about when to and when not to enter a position in the market.
4 - Menus, Tabs, and Functionality
In this chapter all aspects of the user-interface and program functionality
are explained in detail.
4.1 The Tabs
4.1.1 The Main Tab
The Wizard
The wizard guides the user through setting up an analysis. For details on what
each part does, please see the section below about Manual Analysis Setup.
Manual Analysis Setup
In general, the Manual Analysis Setup is an efficient way for experienced users
to setup an analysis without having to traverse the many dialogs of the wizard.

Figure 4.1.1
Manual Analysis Setup on the Main Tab
Perform Test - The Perform Test
button first determines if the combination of inputs are valid. Upon
validation, the inputs are handed off to the primary StockQP engine. Results
of the analysis are listed on the Trade Log, Statistics, and Chart tabs.
Show Trade Log - This button offers
the user a convenient way to switch to the Trade Log tab.
Show Statistics - This button offers
the user a convenient way to switch to the Statistics tab.
Show Chart - This button offers the
user a convenient way to switch to the Chart Tab.
1. Money Management Selection

This section allows the user to select different styles of money management. The
popular choice is to start with $1,000,000 and trade with what's left after
previous trades. This choice is more likely to be used in real-life trading. The
option to trade with the full amount of money on every trade is offered along
with an option to trade in chunks of any size. Chunks of 2 to 20 percent of the
size of the bankroll are common. The options to trade with $1,000,000 per trade
or 10,000 shares per trade speak for themselves. The choice to purchase 10,000
shares per trade is of particularly limited use due to 10,000 shares being worth
vastly varying amounts from symbol to symbol.
2. Selection of the X, Y, and Z
Variables

![]()
X - This variable refers to the number of
consecutive days down a stock must be down in order to be considered for
purchase.
Y - This variable refers to the number of
days a stock is to be held before selling
Z - This variable refers to the percent a
stock must be down over X days in order to be considered for purchase.
Trade Fee - The trade fee is the cost per
purchase or sale of a stock.
Ave Spread - The average spread is the
average distance between the bid and ask price of a stock.
There is currently a limitation of the range of the X, Y, and Z variables. If a
wider range is needed, please contact the dev team. The current range was chosen
to allow for a wide range of testing while keeping the engine as efficient as
possible.
3. Selection of a Time Span

This time span refers to the section of the database to analyze. Quotes that
fall between the Start and Finish dates are analyzed for symbols in the Active
Symbol List. Sometimes it is best to search a few years back instead of the full
20 years due to the split-adjusted quote representation. Details are discussed
in chapter 5.
4. Symbol Selection

This section allows for the specification that StockQP should consider one
particular symbol in the Active Symbol List or all symbols in the Active Symbol
List. It was designed such that most users will trade with all symbols in the
Active Symbol List. If these users suspect a particular symbol is giving strange
results, it is simply a matter of clicking on 'Single Symbol' and re-running the
same test. The Chart, Trade Log, and Statistics Tabs will give a wide range of
information pertaining to the single symbol instead of a combination of all.
4.1.2 Trade Log Tab

The Trade Log tab tracks the progress of every trade executed in the latest
analysis. Below, each column is described in detail:
Type - This column contains either Buy or
Sell referring to the type of entry in the Trade Log
Symbol - This column contains the symbol
of the stock being bought or sold.
Date - This column contains the date of
the purchase or sale.
Price - This column refers to the current
price of the symbol listed in the symbol column.
Percent* - When this column is red, it
refers to the percent the price of the stock is down over X days. Remember, X
refers to the number of days a stock must be down before being considered for
purchase. When the percent is blue, it refers to the percent a symbols' price
has changed since it was purchased.
Shares Bought - This column contains the
number of shares bought on any given trade.
Shares Sold - This column contains the
number of shares sold on any given trade.
Profit - This column contains the dollar
value of profit on individual sales.
Cash - This refers to the amount of cash
currently not invested.
Net Worth - This column refers to the
amount of cash currently not invested plus the total amount of all outstanding
investments.
4.1.3 Statistics Tab

The statistics tab is commonly the
most-used tab. For every analysis, it is important to study key statistics such
as Funds Performance, Trade performance, and basic symbol performance (especially
Average Daily Variation!). The tool in the bottom left part of the screen allows
the user to cycle through each symbol selected for the current analysis (which
will normally be the entire active symbol list). One symbol is added which is
the combination of of all symbols.
All* - This symbol is a combination of
all symbols in the Active Symbol List. Its price is the sum of all 'active'
symbols. In other words, symbols which have yet to IPO or appear on the market
aren't counted until they IPO or appear on the market. Some statistics such as
stock price extremes are ignored on this symbol because they are irrelevant.
Statistics such as Overall Growth give a good idea of the overall performance of
all selected symbols.
Basic Stats

Symbol - Current Symbol whose statistics
are being displayed
Start Price - The earliest quote
encountered for this symbol
Finish Price - The latest quote
encountered for this symbol
Average Price - The average value, in
dollars, of this symbol over the specified range of dates.
High - Highest price the symbol reached.
Low - The lowest price the symbol
reached.
Days Up - Number of days the symbol went
up from one day to the next.
Days Unchanged - Number of days the
symbol went neither up nor down from one day to the next.
Days Down - Number of days the symbol
went down from one day to the next.
Ave. Daily Variation - The average amount
the symbol goes up or down on any arbitrary day of trading. A high value implies
a volatile stock.
Best Yearly Growth - The best year of
growth, where a year is considered to be from January 1st to December 31st. (not
any 365 day period)
Worst Yearly Growth - The worst year of
growth.
Ave. Yearly Growth - This value may be
confusing to some. It is possible to have a positive average yearly growth, but
have an overall decrease in the price of a stock. For example, if stock XYZ began
one year at $10 and finished at $20, we'll say it had a 100% growth that year.
If it decreases by 40% over the next year, it will finish at $12. The next year,
it decreases by 50% to $6. However, when the average yearly growth is computed
we come up with a positive number. (100% - 40% - 50%) / 3 = 3.33% average yearly
growth. The reasoning behind this representation for Average Yearly Growth is
that short-term traders and trade-system administrators are less interested in
the Overall Growth divided by the number of years, and more interested in the
average performance a stock has on any given year.
Overall Growth - This value is simply the
(Finish Price - Start Price) / Start Price. It gives the percentage the stock is
up or down from the start to finish of the selected date range.
Stock Price Extremes

These statistics are symbol specific and are tracked over the specified date
range.
Trade Stats

These statistics are not symbol specific. In other words, all symbols selected
for a particular analysis contribute to these statistics.
Total Trades - Total Amount of trades
across the specified date range.
Best Trade (Profit) - The best trade in
pure dollar amount. (Not necessarily the best percentage trade)
Best Trade (Percent) - The best trade
percentage-wise. (Not necessarily the best money trade)
Trades Resulting in Gains - Number of
Profitable Trades.
Chance of Gain next trade - ((# of
Profitable Trades) / (Total Trades)) * 100%
Average Gain (percent) - (Sum of all gain
percentages) / (Number of trades resulting in gains)
Worst Trade (profit) - The worst trade in
pure dollar amount. (Not necessarily the worst percentage trade)
Worst Trade (percent) - The worst trade
percentage-wise. (Not necessarily the worst money trade)
Trades resulting in losses - Number of
trades that resulted in a negative income.
Chance of Loss next trade - ((# of trades
resulting in losses) / (total trades)) * 100%
Average Loss Percent - (Sum of all loss
percentages) / ( Number of trades resulting in losses)
Average Profit per Trade - (Sum of all
trade results (%)) / (Total Trades)
Average Profit per Trade - (Sum of
profits ($) of all trades) / (Total Trades)
Trade Ratio - (Total # of Trades
resulting in gains) / (Total # of Trades resulting in losses)
Longest Streaks

Price Up / Price Down - All selected
symbols in an analysis are monitored for the longest days-up streak as well as
the longest days-down streak. As seen in the picture above, WMT was up 12
consecutive days and 14.05% percent over those days ending 2-6-95.
4.1.4 Chart Tab

Combined Stock Price - The combined stock
price is calculated in the following fashion.
-
The maximum and minimum price for each symbol are determined
-
For each day of trading, each symbol's price compared to its high is
determined as a percentage. Example: If the all-time high (in the specified
date range) for MSFT is $400 on 1/1/2003, and its price on 1/1/2002 is $200,
then its price compared to its high is 50%. This number is 'registered' as a
50.
-
To determine the combined stock price for any given trading day, each
'active' symbol's price percentage (from step 2) is summed up and averaged.
This gives a number between 0 and 100.
This is done because it gives a more accurate representation of the overall
movement of all symbols in the active symbol list.
Stock Price vs. Funds
The blue line on the right-most Y-Axis refers to the level of trading funds. The
numbers refer to the amount, in thousands, that the funds have varied from the
neutral point (0). The red line refers to the Combined Stock Price. The two
plots give an excellent representation of the overall performance of a trading
strategy given different market conditions. Some strategies offer better
performance on a down-market, some prefer an up-market.
4.1.5
Active Symbol List Editing Tab

Active Symbol List - The Active Symbol
List, also seen on the Main Tab, contains up to 50 Symbols which can be used in
an analysis.
Complete Symbol List - When one of the
radio buttons are selected to the right of the Complete Symbol List, the
Complete Symbol List fills up with all symbols which start with the first letter
associated with the clicked radio button. This has proven to be an efficient way
of sorting through 5000+ symbols. Note:
It is possible to select multiple symbols and add them all at the same
time by clicking the ADD button.
Add Button - When symbols are selected in
the Complete Symbol List, the ADD button sends them over to the Active Symbol
List.
Del Button - When symbols are selected in
the Active Symbol List, the DEL button removes them from the Active Symbol List.
Save Button - This button allows the user
to save an Active Symbol List to file. This provides a convenient way to manage
often-used Active Symbol Lists.
Load Button - This button provides the
user with a way to load Active Symbol Lists from file.
Default
Button - This button loads the Default
Symbol List. The Default Symbol List is located in the root program directory
and is called "Default Symbol List.txt". Feel free to edit it. (Max 50 symbols).
Clear Button - Clears either the Active
Symbol List or Complete Symbol List depending on which Clear button is selected.
Add Single Symbol to Active Symbol List -
This area provides the user with a quick way to add particular symbols to the
Active Symbol List. There is no need to hit the Insert Symbol button. it is only
necessary to type in the symbol name and press the enter key.
Sector Management - Sectors are stored in
Sectors.dat in the root program directory. They are stored in the form:
<Sector Name> <Symbol1> [Symbol2] [Symbol3] ... [Symbol N] where
<> refers to a mandatory entry and [] refers to optional entries. In other
words, for every sector enter a sector name followed by up to 50 symbols
separated by spaces. Show Symbols
provides a message box displaying the symbols in the current sector.
Move Symbols to Active Symbol List moves
all symbols in the current sector to the Active Symbol List.
Move ALL Symbols to Active List moves
symbols from all sectors to the Active Symbol List. This is only recommended if
there are fewer than 51 symbols across all sectors.
4.1.6 Update Quotes Tab

The Update Quotes Tab provides the
user with a simple way to update individual quotes via StockQP
Analytics' online quote
database. Note: This service is enabled
for professional users only. Professional users also receive a completely
up-to-date database every month, whereas Standard users are limited to an
up-to-date database every 12 months.
The Buttons - The top button checks the
online database for the date of the latest quote for a particular symbol in the
online database. The Middle Button checks the local database for the latest
quote entry. The Lower Button actually performs an update for the specified
symbol. (Internet Connection Required for the Lower and Upper Buttons.)
4.2 The Menus
4.2.1 File Menu

Open - This provides the ability to
load a saved analysis. Once a .SQP file is chosen, StockQP will automatically
set the checkboxes, dropdown menus, etc to reproduce a pervious analysis.
Save & Save As - These provide the
ability to save an analysis to a .SQP file. The files remain small making them
convenient for email.
4.2.2 Options Menu
The General Options dialog allows the user to configure StockQP Analytics.
General Options - Main

The Main Tab of the General Options Menu allows the user to toggle two
checkboxes.
1. Remember Trade Settings - If this is
checked, StockQP Analytics will write the last-used trade settings to file upon
closing. When StockQP is loaded in the future, those settings are reenacted.
(Mainly items on the Main Tab)
2. Show Critical Statistics - If checked,
a dialog will pop-up after every analysis displaying several key statistics
about that analysis. Some users may prefer to go directly to the Statistics Tab
so this option is provided.
General Options - Active Symbol List
This tab provides the user with another way to load the default symbol list.
General Options - Trade Log

The Trade Log Tab allows the user to set various colors of the Trade Log
ListView (on the Trade Log Tab of the main program) or to toggle the Grid Lines
on the Trade Log.
4.3 Command Line
Note: This functionally only exists with
the professional version
The
command line runnability of StockQP Analytics allows it to be used as an engine
in a broader trading scheme. Typically, a wrapper program will be written that
generates a StockQP input file and then calls StockQP. The program would then
analyze the results and proceed. Such a program may call StockQP thousands of
times in order to strengthen an existing trading scheme or building a new one.
Usage
SQP.exe <InputFile> <OutputFile>
Input File Format
An example input file is provided in the program directory (A.input). The file
contains 11 required lines.
-
Days Down
-
Days Up
-
Percent Down
-
Start Date Format: m/d/yyyy or mm/dd/yyyy
-
Finish Date Format: m/d/yyyy or mm/dd/yyyy
-
Chunk Size
-
Fund Type. Choices are: 10kPerTrade , 1MillionPerTrade, 1Million
-
Active Symbol List to use for the analysis (File Name)
-
Trade With Chunks? True or False
-
Trade fee
-
Average Spready
Each Entry must contain at least 1 character followed by a colon followed by the
entry. An example for Days Down would be: "Days Down:3". It is important to not
leave any characters between the colon and the entry or after the entry. For
more details, see A.Input in the program directory.
Output File Format
An example output file is provided in the program directory (A.Output). The file
contains 21 statistics about an analysis.
-
Total Trades
-
Best Trade (Profit)
-
Best Trade (Percent)
-
Trades Resulting in Gains
-
Chance of Gain next trade
-
Ave Gain percent
-
Worst Trade (profit)
-
Worst Trade (percent)
-
Trades Resulting in Losses
-
Chance of Loss next trade
-
Average Loss percent
-
Average profit per Trade (%)
-
Average profit per trade ($)
-
Trade Ratio (Gains:Losses)
-
Funds Start Value
-
Funds Finish Value
-
Funds High Value
-
Funds Low Value
-
Funds Average Value
-
Longest Up Streak
-
Longest Down Streak
These statistics mirror those from the Statistics Tab in content and format. The
format for each entry in the output file is: <Description>:<Value>
Where the description describes the type of entry and is followed by a colon
which is followed by the value. There is no space before or after the colon. To
determine the appropriate way to parse the text-based values, view A.Output in
the program directory.
Bankroll Management
When using the "Start with 1 million and trade with what's left after previous
trades" option, it is important to determine the chunk size that is most
appropriate for a particular trading strategy. If the X, Y, and Z conditions may
'hit' on 20 or 30 symbols on a single trading day, it makes sense to invest in
several of the stocks. In the author's experience, chunk sizes 10-20% of the
size of the entire bankroll typically yield interesting results.
Trade Fees
Keep in mind that trade fees are counted twice for a particular investment; once
for the purchase and once for the sale. Trade fees can be set on the Main Tab.
5.1 Design of a
Typical Program which Harnesses StockQP
Analytics' Command Line Runnability
Given the following
-
50 groups of stocks (we'll call them sectors) which 'a trader' feels
oscillate in a similar fashion on the market.
-
The trader has setup 50 .ASL active symbol list files which correspond to
these 50 sectors.
-
The trader has setup 50 StockQP Input Files as described in section 4.3.
-
The trader has determined that the last 3 years of historical quotes are
pertinent to today's markets (The trader sets the range to be 3 years in
length ending today)
General Design
-
For each of the 50 sectors
-
Generate 55 versions of this sector's StockQP Input File with different
values for X, Y, and Z
-
For each of these 55 Input files for the current sector
-
Run StockQP with the appropriate input file and an specified output
file
-
StockQP Outputs to the specified output file
-
Examine the output file and store the results away in a database or
file.
-
Sort the results based upon some criteria (Profitability? Bankroll
Usage?)
-
Record the top J results for each sector where J is a relatively small
integer.
-
Watch for these conditions to appear on the market, knowing that they have
been profitable in the past.
Note: There is absolutely no guarantee that profitable conditions in the past
will result in profits in the future. Please visit section 1 for the logic
behind StockQP.
5.2 Design of a Simulator to test the
usefulness of StockQP
It would be nice to run StockQP on historical data up to today in order to give
a good idea which conditions may yield profitability for certain groups of
symbols, and track the results during the actual trading day. This may be
interesting one or twice, but in order to build up a useful sample size, this
needs to be done thousands of times. This is where a simulator comes in. A
simulator effectively goes back a year or two in time, and does just this. The
general design for such a simulator is listed below:
Given:
-
50 groups of stocks (we'll call them sectors) which 'the trader' feels
oscillate in a similar fashion on the market.
-
The trader sets 50 .ASL active symbol list files which correspond to these
50 sectors.
-
The trader sets 50 StockQP Input Files as described in section 4.3.
-
The trader determines that the last 3 years of historical quotes are
pertinent to today's markets (The trader sets the range to be 3 years in
length ending today)
-
For every day (D) of 2006, starting on January 1st
-
For each group of symbols
-
Generate 55 versions of this sector's StockQP Input File with
different values for X, Y, and Z
-
For each of these 55 input files for the current sector
-
Run StockQP with the appropriate input file and specified output
file
-
StockQP Outputs to the specified output file
-
Parse the output file and store the results
-
Rank the results for this sector
-
See if any of the current market conditions (for day D) match a
'profitable condition' found for any symbol in any sector
-
Simulate a purchase on any stocks that match profitable conditions, and
hold them for the predetermined amount of time.
-
Track statistics about how accurate StockQP Analytics' predictions actually were.
-
Display overall statistics about the accuracy of StockQP Analytics' predictions.
Many of these simulators have been written with very interesting results. The
main focus here is designing a good algorithm for ranking conditions based upon
predetermined likihood for profitability, actual predicted profitability in
StockQP, and actual profitability in the past. These three items do not always
line up perfectly, so there must be some balance. Other important things to
consider is bankroll management - what size chunks should be used? These are
just a few of the variables one will encounter when designing a simulator for
StockQP, and all make a big different in the results.
6 - FAQ
How will this software benefit me?
StockQP provides an excellent service to short-term traders and trade-system
administrators. For short-term traders, it gives some assurance as to whether a
given condition may be profitable or not. To trade-system administrators, it
provides yet another resource for improving the bottom line.
How steep is the learning curve for this
program?
Ever wonder what would happen if you traded a certain way for a year? With
StockQP you can find out with just a few clicks. It is simple to use as a
research tool, yet powerful enough to be used as an engine for a vast trading
scheme.
Does the program offer stock quote database
updates?
Yes. StockQP Analytics Professional users will enjoy monthly complete-updates to
their database with the ability to update individual symbols daily through the
program itself. Standard-Version users must wait for annual upgrades to their
database.
Are there any guarantees? What If I lose money
because StockQP said I was more likely than not to make a profit?
StockQP and Rubicite Interactive provides no guarantee as to whether or not its
predictions will yield profits. The statistics provided are based upon thousands
of historical quotes and market conditions. These statistics are saying, "In the
long run, based upon historical data, if things continue the way they have been,
these statistics should hold roughly true". That being said, we think StockQP
users will thoroughly enjoy using the product and analyzing their results.
Why does this product cost so much?
It was much debated internally about whether or not to release this program
at all. But after careful consideration and the desire for the company to
move towards game development, the decision was made to polish up a
commercial version for sale to the public. The program has evolved over
years of development as heavy research tool. StockQP analytics was at the
core of major
simulators analyzing trends in the market. The code is very specialized but, we
think, provides a great service. We believe the cost of the product reflects its
usefulness and quality.
Copyright © 2006 Rubicite Interactive