<!--
      (Do not remove this comment block.)
  Version: 1.7.6
  Last modified: January 1, 2003
  Maintainers: 
               Chris Lyttle <chris@wilddev.net>
  Written by Chris Lyttle
  Originally designed by Carol Champagne.
  Translators:
               (translators put your name and email here)
-->
 <chapter id="chapter7">
 <title>Investments</title>
 <para>
 This chapter explains how to manage your investments with GnuCash. Most
 people have a investment plan, whether its just putting money into a CD
 account, investing through a company sponsored plan at your workplace or
 buying and selling stocks and bonds through a brokerage. GnuCash gives you
 tools to help you manage these investments such as the <emphasis>Price Editor
 </emphasis> which allows you to record changes in the prices of stocks you own.
  </para>
 <sect1 id="setupinvest1">
 <title>Setting Up Accounts</title>
 <para>
 To setup investment accounts in GnuCash you can either use any of the
 predefined categories or setup your own. The minimum you need to do to track
 investments in GnuCash is to setup an account for your brokerage firm or
 trading account and to add shares to it with a price per share and the transfer
 account that is paying for the investment listed in the transfer box. GnuCash
 will automatically calculate the value of the shares and show at the top of the
 register both the number of shares you own and their current value.
 </para>
 <para>
 The following is a somewhat more complicated example of setting up
 GnuCash to track your investments which has the advantage that it groups each
 different investment under the brokerage that deals with the investments.
 This way it is easier to compare the statements you get from your brokerage
 with the accounts you have in GnuCash and spot where GnuCash differs from the
 statement.
 <literallayout>
- Assets
   - Investments
      - Brokerage Accounts
         - I*Trade
            - Stocks
               - ACME Corp
            - Money Market Funds
               - I*Trade Municipal Fund
            - Cash
         - My Stockbroker
            - Money Market Funds
               - Active Assets Fund
            - Government Securities
               - Treas Bond xxx
               - Treas Note yyy
            - Mutual Funds
               - Fund A
               - Fund B
            - Cash
- Income
   - Investments
      - Brokerage Accounts
         - Capital Gains
            - I*Trade
            - My Stockbroker
         - Dividends
            - I*Trade
               - Taxable
               - Non-taxable
            - My Stockbroker
               - Taxable
               - Non-taxable
         - Interest Income
            - I*Trade
               - Taxable
               - Non-taxable
            - My Stockbroker
               - Taxable
               - Non-taxable
- Expense
   - Investment Expenses
      - Commissions
         - I*Trade
         - My Stockbroker
      - Management Fees
         - I*Trade
         - My Stockbroker
 </literallayout>
 </para>
 </sect1>
 <sect1 id="createport1">
 <title>Creating a Portfolio for Your Current Holdings</title>
 <para>
 If you used the template account setup back in Chapter's 2 &amp; 3, you will
 see the investment accounts in two places under the Assets category. You can
 use this as a portfolio for your investments or if you wish, create your own
 by creating a new sub-account under Assets.
 </para>
 <sidebar>
 <para>
 In order to receive online price quotes for your stocks you will need to
 setup the Perl module Finance::Quote. This is done by opening a root terminal
 session and typing in 'update-finance-quote' (without the quote marks). This
 will launch a Perl CPAN update session which goes out onto the internet in
 order to install the above module onto your system. If you feel uncomfortable
 about doing this please either email the gnucash-user mailing list
 (gnucash-user@gnucash.org) asking for help or come to the gnucash irc channel
 on irc.gnome.org. You can also leave out this step and manually update your
 stock prices.
 </para>
 </sidebar>
 <para>
 You should now have at least one stock account under the Assets category.
 Open the Assets category by clicking on the '+', then select the Investments
 category:
 insert investaccts.png
 </para>
 <para>
 Go to the menu and select:
 <menuchoice>
 <guimenu>Account</guimenu>
 <guimenuitem>Open Subaccounts</guimenuitem>
 </menuchoice>
 Here you see the <emphasis role="strong">Portfolio</emphasis> view. This gives  you an overview of your stock portfolio including the number of shares
 bought and sold.
 </para>
 <para>
 Go back to the Account list. If you open the <emphasis>Brokerage Account
 </emphasis> and <emphasis>Retirement</emphasis> items you will see a list of
 four template investment accounts. You can either use these to record your
 investment transactions or create new ones.
 </para>
 <para>
 To create new investment accounts, click on the <guibutton>New</guibutton>
 button. You should now see the <emphasis>New Account</emphasis> dialog.
 </para>
 </sect1>
 <sect1 id="buyinvest1">
 <title>Buying New Investments</title>
 <para>
 Now that you have setup accounts you can enter in your stocks. If you open
 the account register you will see it looks similar to other account registers
 but instead of deposit and withdrawal columns it has columns to enter share
 amounts and their prices. 
 </para>
    <orderedlist>
    <listitem>
     <para>
 Start off by filling in the <emphasis>Date</emphasis> and <emphasis>Description</emphasis> fields.
     </para>
    </listitem>
    <listitem>
     <para>
 Choose a transfer account to indicate which account was used to pay for buying the stock. 
     </para>
    </listitem>
    <listitem>
     <para>
 Fill in the number of shares purchased in the <emphasis>Shares</emphasis> column and the price paid for the shares in the <emphasis>Price</emphasis> column.
     </para>
    </listitem>
    <listitem>
     <para>
 Enter the total cost of the transaction in the <emphasis>Buy</emphasis> column and then tab or click the <guibutton>Enter</guibutton> button to finish the transaction.
  insert buytrans.png
  </para>
  </listitem>
  </orderedlist>
 </sect1>
 <sect1 id="sellinvest1">
 <title>Selling Investments</title>
 <para>
 Entering an investment you are selling is done in the same way as buying one
 except the total cost of the transaction is entered in the
 <emphasis>Sell</emphasis> column and the <emphasis>Shares</emphasis> column
 is entered as a negative amount.
 insert selltrans.png
 </para>
 </sect1>
 <sect1 id="divint1">
 <title>Recording Dividends and Interest (How-To)</title>
 <para>
 </para>
 </sect1>
 <sect1 id="splitmerge1">
 <title>Recording Stock Splits and Mergers (How-To)</title>
 <para>
 </para>
 </sect1>
 <sect1 id="employeeplan1">
 <title>Recording Employee Stock Plans (Discussion)</title>
 <para>
 </para>
  <sect2 id="purcstock2">
 <title>Stock Purchase Plans (How-To)</title>
 <para>
 </para>
  </sect2>
  <sect2 id="soptions2">
 <title>Stock Options (How-To)</title>
 <para>
 </para>
  </sect2>
 </sect1>
 <sect1 id="manageport1">
 <title>Managing your Portfolio (Discussion)</title>
 <para>
 </para>
  <sect2 id="portview2">
 <title>Portfolio View</title>
 <para>
 </para>
  </sect2>
  <sect2 id="updateprices2">
 <title>Updating Prices (How-To)</title>
 <para>
 </para>
  </sect2>
  <sect2 id="capitalgain2">
 <title>Measuring Capital Gains (Discussion)</title>
 <para>
 </para>
  </sect2>
 </sect1>
 <sect1 id="reconcilebroker1">
 <title>Reconciling with the Brokerage Statement (How-To)</title>
 <para>
 </para>
 </sect1>
 <sect1 id="stockegs1">
 <title>Putting It All Together</title>
 <para>
 </para>
 </sect1>
 </chapter>
