Stock market simulator 
Author Message
 Stock market simulator

Hi all,

I would like to create a fictitious stock market exchange on a website,
where users buy and sell stocks of imaginary companies.  Are there any
already available Perl scripts that do this sort of simulation?

Thanks in advance!

Wisam

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Wed, 18 Jun 1902 08:00:00 GMT  
 Stock market simulator

Quote:

> I would like to create a fictitious stock market exchange on a website,
> where users buy and sell stocks of imaginary companies.  Are there any
> already available Perl scripts that do this sort of simulation?

Here's a script that might help in putting something like this
together - it simulates, on a crude level, the observed
fluctuations in a stock price.

best regards,
randy kobes

##################################################
#!/usr/bin/perl -w
use strict;
#
# $rate (0 < $rate < 4) controls the rate of change of the price
#
my $rate = 3.98;
#

# where the array index 0 ... $max_time denotes the time
# (this can be in seconds, days, months, years, ...).
# All prices are between 0 and 1; scale as desired.
# $max_time is the maximum time; $initial_price is the initial price.
#
my $initial_price = 0.7;
my $max_time = 20;
#
# get the array with future prices

#
# print it out
for (my $k = 0; $k <= $max_time; $k++) {
    print "time: $k \t price: $price[$k]\n";

Quote:
}

# routine to calculate future prices
sub logistic {


  $x[0] = $xstart;
  for (my $n = 0; $n < $N; $n++) {
    $x[$n+1] = $mu * $x[$n] * (1 - $x[$n]);
  }

Quote:
}

################################################


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. stock market simulator

2. Stock Market script

3. stock market chart?

4. ATM network simulator written in PERL

5. ANNOUNCE: Gann-0.00 neural network simulator perl module

6. array for network simulator

7. MARKET SURVEY

8. Perl from the Market viewpoint

9. Luxury Back Massage at SUPER Below market price for internet ONLY

10. Perl Marketing Position with O'Reilly

11. capturing streaming market data

 

 
Powered by phpBB® Forum Software