You can have a system that works very well with Yahoo data but not in the real world due to two reasons:
-data integrity
-survivorship bias
So to get good data you need to pay. It's imperative you have good data.
A couple sites: Futures Data (free): http://www.tradingblox.com/tradingblox/free-historical-data....
Futures Data (paid): http://www.pinnacledata.com/
Stock Data (paid, highly recommended): http://www.premiumdata.net/
Stock Data (paid): http://www.csidata.com/
You can get forex data from oanda, fxcm, metatrader, ninjatrader.
You can also backtest on tradestation.
Also, tick data and OHLC data can affect your style-- if you're swing trading you need OHLC but if you're doing more short term, you need tick data.
It's free, and decent quality.
The interface is RESTful, but the data is a funky binary format that's hard to parse without the documentation they make you sign an NDA to get.
http://www.tdameritrade.com/tradingtools/partnertools/api_de...
also if you choose Yahoo http://code.google.com/p/yahoo-finance-stock-data/
http://finance.yahoo.com/q/hp?s=GOOG
There's a CSV download option.
The base is http://www.google.com/finance/historical?q= then the symbol such as goog then you need to specify a start date by adding the query string "startdate" to the url along with the query string "enddate" and finally you will always want to dump it as a csv: "output=csv"
a note about the dates, It should be formatted in such a way that it is [Month][Day][%2C+][Year] where Month is the first 3 letters of the month.
all together it would look like this: http://www.google.com/finance/historicalq=goog&startdate...
I should note that has been some changes since the last time I've ran the code to scrape the data, but i don't think things have changed dramatically.