Are they actions of buying and selling be the sole driver of the price?
1. Consume live market data and use an exchange simulator that always gives you back a fill. 2. Use a true exchange simulator, which you will have to seed with orders to provide liquidity and generate real quotes (with a proper spread and not locked or crossed).
With the second approach, you get a more accurate representation of how markets work, but the exercises will have to be more planned out and directed.
Just my $0.02.
The computer will present you with a random historical
stock chart of an actual large cap (S&P 500) security,
without telling you which company and time period the
chart represents.
You are then given the opportunity to reveal the stock
chart one day at a time, selecting to "buy" or "sell"
the stock at various times. After a maximum of one year
is played for the security, the actual name of the company,
and what time period the graph was for is revealed...
You are rated on how much profit you made over the days
you were invested... [compared] to a strategy of "buy and
hold" on the stock.
[1] http://chartgame.com/