GnuCash allows you to track bank accounts, stocks, income, and expenses. As quick and intuitive to use as a checkbook register, it is based on professional accounting principles to ensure balanced books and accurate reports. It is backed by an active development community and is blossoming into a full-fledged accounting system.
Finance::Quote is a Perl module which can fetch on-line stock quotes, including those from American, European, Canadian and Australian markets. Information from a number of investment houses is also available. Features include currency lookups and conversions, automatic failover support, and loadable user modules.