Capital Gainz - Newsletter #2

             Capital Gainz Newsletter #2
                   April 3, 1998
                     Dave Cohen
                  AlleyCat Software
This is the second quarterly Capital Gainz newsletter. In 
these newsletters, I'll provide useful hints and tips. 
To make things easy for email, these newsletters will be 
plain old  ASCII text.

If you want to be removed from the mailing list, send me a 
request via email.


 1) Window Shrinking/Growing
 2) Sell Methods
 3) Never Panic On Errors
 4) Bonus News
 5) New Browser
 6) MS IE and Capital Gainz Installation
 7) Price Sources
 8) Reinvestment/Redistribution
 9) Portfolio History
10) Performance

1) Window Shrinking/Growing

I've been fighting a problem where Capital Gainz' windows 
would mysteriously shrink between program use. After using 
the program, the next time the user brought it up, the 
window would be smaller. I could reproduce this behavior.

I thought I fixed this in 5.2z, but several users still
reported it. Worse, one user even indicated that his window
was growing in size. I suspect some differences in video
drivers, because I can't get it to occur with the new 
version on any of the PCs in my office - each of which 
has a different video card.

Thus, I introduced a setting in 5.2C that effectively
freezes the window size. By turning this setting on, any
adjustments to window size are not saved at program exit.
The setting is in:
under the section:
and is named:
It can be set to True:
or False:
The value must be set by editing CG.INI manually. There is
no option in any of Capital Gainz' settings screens 
(although the next update will have it in User Settings).

If you are experiencing the mysterious window 
shrinking/growing problem, do the following:
  1) Size your Capital Gainz window like you want it to be
  2) Exit from Capital Gainz
  3) Edit CG.INI
  4) In CG.INI, locate the [SizeSettings] section
  5) In CG.INI, add SaveSizeSettings=TRUE
  6) Exit the editor and save CG.INI

2) Sell Methods

Capital Gainz supports the following methods to sell shares:
  FIFO - First-In/First-Out
  LIFO - Last-In/First-Out
  ID   - Manually choose shares to sell
  MAX  - Select shares with maximum gain/minimum loss
  MIN  - Select shares with minimum gain/maximum loss
  SCAT - Sell shares using single-category average cost

FIFO is the default method that is assumed by the IRS unless
you explicitly specify another method. An exception is the
SCAT method, which can only be used for mutual fund sales 
and does not need to be explicitly chosen.

Actually, LIFO, MAX, MIN, and ID are really just variations
on selecting specific shares to sell. The ID method is used
to manuallyy choose the shares, while the other methods tell
Capital Gainz to automatically select specific shares.

So, except for SCAT, which can only be used for mutual 
funds, any method can be used for any security. It is 
important to remember that if a method other than LIFO or
SCAT is used, you need to at least have a paper trail 
showing that you ordered specific shares to be sold. 

The answer to the paper trail is easy. In Capital Gainz, 
be sure that the Brief Reports option is turned off in the
Report Settings. Then:
  - Go through the steps to sell shares using whichever 
    method you wish, using the current price
  - Generate the sell report and send it to the printer
  - Do not confirm the sale
  - Mail the report to the fund company, broker, or 
    dividend reinvestment plan administrator - it provides 
    instructions on which shares to sell.

The fund company, broker, or dividend reinvestment plan
administrator doesn't really care about which shares are 
sold, but the IRS does state you need a paper trail.

When the sale is confirmed by the fund company, broker,
or dividend reinvestment plan administrator, then go into
Capital Gainz and execute the sale using the same method,
this time using the actual selling price. Then, confirm 
the sale.

Why would you want to use the different methods? Well:
  - FIFO is the default method, and with a stock or fund 
    going up in price will generate higher realized gains
    or lower realized losses. For a stock falling in price, 
    it will generate lower realized gains or higher 
    realized losses.
  - LIFO, when used with a stock or fund going up in price,
    will generate lower realized gains or higher realized 
    losses. For a stock falling in price, it will generate
    higher realized gains or lower realized losses.
  - ID lets you specify shares to sell, giving you control
    over realized gains/losses and holding periods.
  - MAX selects shares to sell that will provide highest 
    gains or lowest losses, regardless of holding period.
  - MIN selects shares to sell that will provide lowest
    gains or highest losses, regardless of holding period.
  - SCAT averages the cost of shares, and sells them FIFO.
Thus, assuming a rising stock or fund price, the highest to
lowest gains would likely be produced by this order of 
methods:  MAX, FIFO, SCAT, LIFO, MIN (ID's position varies)

The usefulness of the methods, from most useful to least 
useful, is:
  - FIFO: It is the default, and assuming a rising market,
          it results in higher gains
  - MIN:  It minimizes gains
  - MAX:  It maximizes gains
  - ID:   It minimizes/maximizes gains, considering holding
  - LIFO: Assuming a rising market, it results in lower
  - SCAT: Mutual funds usually report gain/loss using this

"But wait!", you argue. "Don't we have to use SCAT for 
mutual funds? Why else would mutual funds report that value?"
In answer, let's move on to my tirade against SCAT. First, 
the facts:
  - You don't have to use SCAT with mutual funds. This has
    been discussed by the powers that be, and would be a 
    very, very stupid rule.
  - You can't use SCAT with other non-mutual fund 
    investments, even dividend reinvestment plans.
  - While many funds report gains/losses based on SCAT,
    they only report the amount sold to the IRS - the
    actual gain/loss they calculate is not passed along
    to the IRS.
  - Once you've used SCAT for a fund, you can't change to
    another method - you're stuck with it.
  - SCAT will NEVER result in maximized gains or losses.
  - SCAT does not make it easier to manage many investments
    over many years - you still need to keep up with holding
    periods, making it no different than FIFO. However,
    Capital Gainz does manage the holding period for you.
  - Fixing errors with omitted or incorrect investments 
    recorded with SCAT securities is difficult business.
    Any sales that occurred since the error must be backed
    out, then recalculated after the error is fixed. That's
    because each sale depends on correct entry of EVERY
    prior purchase/sale. Even in Capital Gainz, you have to
    unsell sales that occurred after the error, fix the 
    error, then reexecute the sales. And what if this spans
    multiple tax years, making prior tax returns incorrect?
  - It is very easy to make mistakes (that are hard to fix)
    by recording buys or sells out of order.
  - Don't use SCAT with money market funds in Capital Gainz. 
    It adds extra processing that slows things down, even 
    though prices are constant.
  - If you use SCAT with a fund that has many sales, such as
    a bond fund with check writing privileges, accountants
    will flee when they see you coming.
  - The IRS is not our friend. By providing the SCAT method,
    they've made it hard on investors. As stated, you (or 
    specifically, Capital Gainz) still need to keep up with
    holding periods (3 of 'em now). Plus, take a look at the
    rules for double category average cost. In this method
    (not supported by Capital Gainz), average prices are 
    maintained for long and short term periods. Guess how 
    happy investors that foolishly fell into this IRS trap
    feel now that a third holding period has been added?
    Conversion is guaranteed to be a nightmare.

In short, there is absolutely NO advantage, and many 
disadvantages, to using the SCAT sell method. Unless you
absolutely have to use it (for instance, if you already used
it for one or more funds), I strongly recommend using FIFO,
MAX, or MIN instead.

3) Never Panic On Errors

If you experience a data failure or corruption in Capital
Gainz, never panic. The first thing you should do is save 
the *.DAT and *.K01 data files to another directory on the 
hard drive or to a floppy drive. Don't delete the data or 
copy over it from a backup until you safely store the 
current data somewhere! If the backup is bad, or very old, 
you've just made a bad situation MUCH worse.

Once you've saved the current data somewhere, restore the 
data from your most recent backup to the Capital Gainz data
directory. (Don't have a current backup? Shame, shame! Skip
this and the next paragraph and read on.) If Capital Gainz 
won't even start up because of a corruption, you will need
to copy the data manually. If the data was backed up 
without compression, simply copy the *.DAT and *.K01 files
from the backup diskette to the Capital Gainz data 
directory. If it was backed up with compression, you'll 
need to decompress the files from the ZIP archive 
(probably CGDATA.ZIP) on the backup diskette, using PKZIP 
or WinZIP, to the Capital Gainz data directory.

If the backup is from a prior version of Capital Gainz,
you'll need to upgrade it to the current version. (Shame, 
shame! Why don't you keep current backups?) To see
what version the data is for, display the contents of the
SETTINGS.DAT file (do not edit/save this file!). To see 
what version of Capital Gainz is installed, look at the 
top of the CG.INI file. If the data version is less than 
the installed version (say, the data is 5.1 and the program
is 5.2), the easiest thing to do is reinstall Capital Gainz
and be sure the Upgrade runs at the end. If it doesn't,
run it from the Old-New icon in the Capital Gainz program

If none of the above helped, or if the backup disk turned 
out to be bad, there are a couple more avenues left. Before
addressing these, I'd strongly suggest getting into the
habit of doing regular backups using at least 3 disks in 
rotation: disk 1 on day 1, disk 2 on day 2, disk 3 on day 3,
disk 1 on day 4, etc. Diskettes go bad easily, and this
means that a failure of one won't be catastrophic.

Ok, now you're stuck. If you recently upgraded your version
of Capital Gainz, then at the end of that installation
Capital Gainz upgraded your data. Before the upgrade
commenced, however, you were given the option of backing up
the old version's data (which you should have done!). 
By default, the old data was stashed in a directory on your 
hard drive under the Capital Gainz directory. For instance,
if you upgraded from 5.1 to 5.2, the old 5.1 data would 
likely be in \CAPGNZ\CG51DATA. Just copy the files from
that directory to the \CAPGNZ directory, then reinstall
Capital Gainz to trigger the update. If it hasn't been 
long since the initial upgrade, you haven't lost much.

Finally, if you have no backups of any kind, I can usually
reconstruct the data so you have minimal data to reenter.
You can send the *.DAT and *.K01 files to me on diskette,
or email them in a ZIP archive to
Do not email me the individual *.DAT and *.K01 files - only
a ZIP archive! And, if you did follow poor backup habits in
the past, brace yourself to be dressed down.

4) Bonus News

While I email out these newsletters quarterly, I sometimes 
compose bonus newsletters in between. These are not emailed
out. In addition, as some of you change email addresses, 
you may miss some newsletters. In any case, all newsletters
can be found on our Web site at:

5) New Browser

With all the press about the battle between Microsoft 
Internet Explorer and Netscape Navigator, it's easy to 
assume they are the only browsers around. Well, I recently
ran across a browser called Opera, and was surprised at how
much faster it was than MS IE. Plus, I really like the
interface better - I can have multiple browser windows open, 
and the windows can be saved when you close the browser, so
that you are reconnected to the same sites when you start it
up again. Plus, the entire browser installation can be 
copied to a single floppy disk. 

The downside is that Opera does not support Java or scripting.
Thus, you likely still need Internet Explorer or Navigator 
on your system. But if you're stuck with a 28.8kbps 
dialup connection as I am, the speed improvement is well 
worth the drawbacks. You can get Opera from:
It even downloads files much faster!

In addition, a nice tool for managing Favorite lists can be
downloaded from:
The tool, named Columbine Bookmark Merge, takes a little 
effort to get started with, but is easy once you use it
for a bit. It lets you combine or convert bookmark lists 
among Internet Explorer, Navigator, and Opera formats.

6) MS IE and Capital Gainz Installation

MS Internet Explorer 4.0 has tripped up several programs
on my system. In fact, I've seen one instance where 
I could not install Capital Gainz if MS IE was running.
So, if you have problems installing software, heed the
advice of the installation program and exit from all other
programs that are running - especially MS IE.

7) Price Sources

For the next update, I've added easy handling for prices
from the following sources:
  - (
  - Quicken ( FREE?
  - IRNet ( FREE
  - Yahoo ( FREE
  - Reuters
  - Merrill Lynch On Line
  - InfoBeat ( FREE

While many of these can already be used by setting the
input price file format, the next update will recognize the
format for a given service. Plus, you will be able to 
specify different start/end tokens, for services like that insist on adding stuff before and after the
actual prices. (See Bonus Newsletter #1 for details on how
you can take specify start/end tokens with Capital 
Gainz 5.2.)

These are in addition to existing support for:
  - AOL
  - CompuServe
  - MetaStock
  - Telechart 2000
  - Prodigy
  - any comma-delimited input
The next update will allow you to import prices from
Compuserve, Prodigy, and AOL from the Prices/Update
Prices from File option, instead of going through

8) Reinvestment/Redistribution

After you record a dividend, interest, or capital gain
distribution, Capital Gainz asks if you want to reinvest
the amount (if the Reinvest Distributions option is set in
User Settings). If you receive distribution checks instead
of reinvesting, answer No. If you do reinvest, answer Yes
and you are taken to the Reinvest Distributions window -
which is the same as the Buy Shares window. By default, the
current security is shown - this is usually correct, since
you are probably reinvesting in the same security. However,
you may have distributions directed to a money market fund,
in which case you would specify that security to Capital
Gainz in the Reinvest Distributions window.

When reinvesting distributions in the Reinvest Distributions
window, the Amount field is not calculated - the 
distribution amount specified in the Record Distribution
window is used. You can, of course, type over this value.

Note that the distribution and the reinvestment purchase
are not linked in any way - the window sequence is there
just to ease entry. Once recorded, the distribution is
in the Distribution Table and the reinvestment is in
the Open Shares Table (likely for the same security). 
Changing either one won't affect the other - if the 
distribution was wrong, you must edit records in both 
tables. Also, this means that you don't have to enter the
distribution and reinvestment at the same time.

While I'm on the topic, remember that the Per Share field
on the Record Distribution window is NOT the reinvestment
price or price on the day of the distribution. It is the
amount per share distributed, such as the dividend rate.
The reinvestment price is recorded on the Reinvest
Distribution (Buy Shares) window. (See Bonus Newsletter #1
for more details on Distribution Per Share.)

The Redistribute Proceeds option is very similar to
Reinvest Distributions. There is a User Setting to
specify whether or not to Redistribute Proceeds. If this
setting is on, then whenever you record a sale in Capital
Gainz, you are asked if you want to redistribute the 
proceeds from the sale. If you are receiving a check
for the amount, answer no.

If you do redistribute the proceeds, answer Yes to
bring up the Redistribute Proceeds window, which is the
same as the Buy Shares window except that the Amount is 
set to the sold amount less the selling commission, and not
calculated using shares and price. By default, the
security to redistribute to is set to the same as
the security that was sold. This should be changed to
the security where the sale proceeds will be put, most
likely a money market fund. 

Like reinvested distributions, the sale and the 
redistribution purchase are not linked in any way - 
the window sequence is there just to ease entry. Once 
recorded, the sale is in the Closed Shares Table and the 
redistribution is in the Open Shares Table (likely for 
different securities). Changing either one won't affect
the other - if the sale was wrong, you must edit records
in both tables. Also, this means that you don't have to
enter the sale and redistribution on the same day.

9) Portfolio History

I often get reports of 'errors' from users stating that the
Portfolio History Table, Report, and Graph return messages
indicating that there are no portfolio history records. 
This is not a program bug - you must explicitly create and 
maintain Portfolio History yourself.

To record portfolio history, highlight the Portfolio in the
Portfolio Table and select Portfolios/Portfolio History.
At the table, you can add Date/Value/Return entries from
manual records you've maintained. But, it's more likely
that you'll want Capital Gainz to calculate these for you.
To do this, click on the Calculate button on the Portfolio
History Table's toolbar.

From the Calculate Portfolio History window, you can have
Capital Gainz calculate values/returns for a single day,
monthly for a date range, quarterly for a date range, or
yearly for a date range. This can be a slow process, since
Capital Gainz must retrieve, sort, and calculate all buys, 
sales, and distributions for all securities in the 

Speed is precisely why Capital Gainz forces you to 
explicitly specify to calculate these values. If it 
generated this information automatically for reports or
graphs, the process would be excruciatingly slow. It's 
better for the user to build this table on an ongoing 

If you want to maintain portfolio histories:
- First, decide how frequently you want to record histories.
  Generally, it's best to use monthly, quarterly, or yearly.
- For each portfolio, go to the Portfolio History Table
  and tell Capital Gainz to calculate past dates/values
  for the chosen frequency.
- As you use Capital Gainz, calculate single day histories
  in the Portfolio History Table on days corresponding to
  your desired frequency - month-end, quarter-end, or
  year-end. If you miss a day, just tell Capital Gainz
  to calculate the history for a single, specific day.
10) Performance

Capital Gainz' Performance Report can calculate two 
different performance figures relating to your actual
performance: an unweighted performance number and
a time-weighted performance number. The time-weighted number
is actually the Internal Rate of Return, or IRR. IRR is 
calculated if the Use Internal Rate of Return option is 
selected in User Settings. If it is not selected, then 
unweighted performance is calculated. In the next update, 
the Use Internal Rate of Return setting will result in both
IRR and the unweighted figure being displayed on the 
Performance Report, while not selecting that option will 
result in just the unweighted figure being displayed. The 
IRR calculation is considerably more time consuming than the
unweighted performance calculation.

In contrast to the Performance Report, the Total Return 
report shows the performance of the security, based on
prices and distributions only. It does not reflect how your
transaction history with the security fared.

In either the unweighted or IRR performance calculation, 
the dollar figure reported measures the in-flow and 
out-flow of cash in order to arrive at how much money you
made or lost in the selected period.

There are five components to the performance return:
  o Holdings as of the specified begin date. 
    This includes shares purchased before the begin date 
    and not sold as of the begin date.
  o Purchases over the period. 
    This includes all purchases between the begin and end
    dates, whether or not you sold the shares later. 
  o Distributions received and fees paid over the period.
  o Sales over the period.
  o Holdings as of the specified end date. 
    This includes shares purchased before the end date 
    and not sold as of the end date.

For the unweighted performance figure, return is calcuated:

begin_price = first price found after begin date
initial_value = open shares at begin date multiplied by 
end_price = last price found before end date
end_value = open shares at end multiplied by end_price
sell_amt  = total amount of sales over the period
sell_comm = total selling commissions over the period
buy_amt   = total purchase amount over the period
buy_comm  = total purchase commissions over the period
distr     = total dividends, interest, and capital gains 
            received over the period
fees      = total fees paid over the period

return    = end_value 
            + (sell_amt - sell_comm) 
            + (distr - fees) 
            - (initial_value + buy_amt + buy_comm)

reinvest_distr = any distribution preceding a purchase
reinvest_sales = any sales preceding a purchase
reinvest       = reinvest_distr + reinvest_sales
comm           = buy_comm + sell_comm
numerator      = return
denominator    = initial_value 
                 + buy_amt 
                 - reinvest 
                 + comm
return%        = (numerator/denominator) * 100

Dividend and sale amounts are assumed to be reinvested if
there are ANY subsequent purchases. When evaluating total 
portfolio performance return, this applies across all 
securities. Thus, if a sale of fund XYZ is recorded on a 
date prior to a purchase of fund ABC, then some or all of 
the purchase amount for ABC is treated as a redistribution 
from the sale of XYZ. 

An equivalent annual rate is determined:

start_value  = initial_value + buy_amt - reinvest + comm
finish_value = start_value + return
ratio        = finish_value/start_value
rate%        = (ratio^(1/years)- 1) * 100

For the IRR figure, an iterative process is used on the
initial value, end value, buys, sales, and distributions. 
The IRR delivers a time-weighted performance by examining
the actual cash flows. The IRR calculation is too complex 
to explain here, but it is explained in detail in many 
accounting texts, generally in the sections where the 
present and future value concepts are discussed.

Based on the calculated IRR, a return percentage for the
entire period is then determined:
IRR%    = internal rate of return of cash flows
return% = (((1+(IRR/100))^years)-1) * 100


A fund that has many buys, sales, and distributions has 
the following totals from 1/01/90 and 12/31/92:

begin_price   = 8.39 on  1/01/90 
initial_value = 303.65
end_price     = 11.35 on 12/31/92
end_value     = 2457.30
sell_amt      = 510.00
sell_comm     = 0.00
buy_amt       = 2332.29
buy_comm      = 0.00
distr         = 132.29
fees          = 10.00

return        = 2457.30 
                + 510.00 
                + 122.29 
                - (303.65 + 2332.29) 
                = 453.65

Internal Rate of Return calculation:

IRR%    = 15.70%
return% = (((1+(15.70/100))^2)-1)*100 = 54.92%

Unweighted Return calculation:

reinvest_distr = 132.29
reinvest_sales = 510.00
reinvest       = 132.29 + 510.00 = 642.29
numerator      = 453.65
denominator    = 303.65
                 + 2332.29
                 - 642.29
                 = 1993.65
return%        = (453.65/1993.65) * 100 = 22.75%
start_value    = 303.65 
                 + 2332.29
                 - 642.29 
                 = 1993.65
finish_value   = 1993.65 
                 + 453.65 
                 = 2447.30
rate%          = ((2447.30/1993.65)^(1/3)- 1)*100 = 7.07%

The IRR is about twice the unweighted rate, reflecting
the time-weighting effect of periodic purchases over time.
IRR is more accurate to deterimine the annual rate, but
the unweighted return is better for the overall return