Your SlideShare is downloading. ×
0
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Stock market trading simulator multiagent based-2009-Cadiz-Spain
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Stock market trading simulator multiagent based-2009-Cadiz-Spain

782

Published on

Published in: Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
782
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
47
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  1. Multifractal analysis and multiagent simulation for market crash prediction V. Romanov, V.Slepov, M. Badrina, A. Federyakov Russian Plekhanov Academy of Economics Computational Finance 2008 27 – 29 May 2008 Cadiz, Spain April 16, 2011
  2. PREDICTION DIFFICULTIES <ul><li>It is well known, that financial markets are essentially non-linear systems and financial time series are fractals. </li></ul><ul><li>That’s why prediction of crash situations at finance market is a very difficult task. It doesn’t allow us to use effectively such well-known methods as ARIMA or MACD in view of their sluggishness. </li></ul><ul><li>Multifractal and wavelets analysis methods are providing more deep insight into the nature of phenomena. Multiagent simulation makes it possible to explicate dynamic properties of the system. </li></ul>April 16, 2011
  3. April 16, 2011 Examples of outputs market model Non-linear oscillation The strange attractor This output looks like head and shoulder pattern Artificial time series generation
  4. The Aims and Methodology <ul><li>As soon as our aim is predicting Crash situations we are trying at first to find out the best indicator which uses Multifractal analysis and wavelet analysis methodology. </li></ul><ul><li>With this aim in mind we are testing different pre-processing kinds of original time series to discover the best indicator. </li></ul>April 16, 2011
  5. Fractals <ul><li>The term fractal was coined in 1975 by Benoît Mandelbrot, from the Latin fractus , meaning &quot;broken&quot; or &quot;fractured&quot;. </li></ul><ul><li>(colloquial) a shape that is recursively constructed or self-similar, that is, a shape that appears similar at all scales of magnification. </li></ul><ul><li>(mathematics) a geometric object that has a Hausdorff dimension greater than its topological dimension. </li></ul>April 16, 2011
  6. Mandelbrot Set April 16, 2011 Mandelbrotset, rendered with Evercat 's program.
  7. Dynamic systems fractals April 16, 2011
  8. Dimension <ul><li>What is fractal dimension? </li></ul><ul><li>There are different kinds: </li></ul><ul><li>Hausdorff dimension… how does the number of balls it takes to cover the fractal scale with the size of the balls? </li></ul><ul><li>Box-counting dimension… how does the number of boxes it takes to cover the fractal scale with the size of the boxes? </li></ul><ul><li>Information dimension… how does the average information needed to identify an occupied box scale? </li></ul><ul><li>Correlation dimension… calculated from the number of points used to generate the picture, and the number of pairs of points within a distance ε of each other. </li></ul><ul><li>This list is not exhaustive! </li></ul>April 16, 2011
  9. Hurst exponent <ul><li>In prediction financial market behavior a special role belongs to the study of Hurst exponent. The exponent Hurst evaluation and its changing gives an opportunity predict trend replacement in critical points. The Hurst exponent H is statistical measure used to classify time series. </li></ul><ul><li>The larger this value is the stronger trend. Time series with large Hurst exponent can be predicted more accurately than those series with value close to 0.50. The Hurst exponent provides a measure for long term memory and fractality of time series. </li></ul>April 16, 2011
  10. Hurst exponent for monofractals <ul><li>Depending on the value of Heurst exponent the properties of the process are distinguished as follows: </li></ul><ul><li>When H = 0.5, there is a process of random walks, which confirms the hypothesis EMH. </li></ul><ul><li>When H > 0.5, the process has long-term memory and is persistent, that is it has a positive correlation for different time scales. </li></ul><ul><li>When H < 0.5, time-series is anti-persistent with average switching from time to time. </li></ul>April 16, 2011
  11. Multifractal time series (1) April 16, 2011 The process is multifractal if: where c(q) – predictor, E – expectation operator, scaling function, which expresses mutifractality properties of time series In case of monofractal For scaling function estimation we will construct partition function
  12. Multifractal time series (2) April 16, 2011
  13. Time series partitioning <ul><li>Time series: { xt } ; t  [0, T ]. </li></ul><ul><li>Compute : Z ={ zt }, zt= lnxt+1-lnxt; t  [0, T ] ; </li></ul><ul><li>Divide interval [0, T ] into N subintervals , 1 ≤ N ≤ Nmax . </li></ul><ul><li>Each subinterval contains int ( T/N )= A values Z; </li></ul><ul><li>For each subinterval K; 1 ≤ K ≤ N current reading number lK; 1 ≤ lK ≤ A; t = ( K -1) А+ lK </li></ul><ul><li>As soon as we are looking for the best indicator of a coming default, we will use several variants of a preliminary processing. </li></ul>April 16, 2011
  14. Time series preprocessing <ul><li>1. The original time series itself: Z ={ zt } ; </li></ul><ul><li>2. Preprocessed time series Z 1={ }, K =1,2,… N, where </li></ul><ul><li>3. Preprocessed time series where </li></ul><ul><li>4. Preprocessed time series Z3={ } </li></ul>April 16, 2011
  15. Partition functions April 16, 2011 For each preprocessed time series compute partition function for different N and q values :
  16. Scaling functions (see main fractal property) April 16, 2011
  17. Fractal dimension spectrum estimation April 16, 2011 <ul><li>Lipshitz – Hoelder exponent estimation : </li></ul><ul><li>, where i = 1, 2, 3, 4. </li></ul><ul><li>2. Fractal dimension spectrum estimation by Legendre transform : </li></ul>
  18. Fractal dimension spectrum width as crash indicator <ul><li>Multifractal may be composed of two or infinite number of monofractals with continuous varying α values. Width of α spectrum may be estimated as difference between maximum and minimum values of α: </li></ul><ul><li>By carrying out Legendre transform we are trying using our program by estimating Δ  to find differences in its values before and after crash. </li></ul><ul><li>Roughly speaking f(  ) gives us number of time moments, for which degree of polynomial, needed for approximation f(  ) equals  (according to Lipshitz condition). </li></ul>April 16, 2011
  19. Experimental results (multifractal analysis) April 16, 2011 The method of multifractal analyses, described above, has been applied also for October 1987 USA financial crises, using Dow Jones index Fig. 1. Figure 1: Dow Jones industrial average data for period 01.02.1985 – 31.12.87. Axis X contains serial numbers of readings.
  20. Fractal spectrum estimation April 16, 2011 Figure 2: Fractal dimension spectrum F2 (  ) for DJ industrial average series for period 10.10.85-19.10.87. Fractal dimension spectrum for 18.11.96-30.11.98 time period ( Russian default currency exchanging data ) Fractal dimension spectrum for 09.07.96-21.07.98 time period ( Russian default currency exchanging data )
  21. Multifractal spectrum width before and after crisis April 16, 2011 Figure 3: Fractal dimension spectrum width F1 (  ) changing before and after crises.
  22. Multifractal spectrum width before and after crisis (continued) April 16, 2011 Figure 4: Fractal dimension spectrum width F2 (  ) changing before and after crises.
  23. Wavelet analysis <ul><li>Wavelet </li></ul><ul><ul><li>A small wave </li></ul></ul><ul><li>Wavelet Transforms </li></ul><ul><ul><li>Convert a signal into a series of wavelets </li></ul></ul><ul><ul><li>Provide a way for analyzing waveforms, bounded in both frequency and duration </li></ul></ul><ul><ul><li>An alternative approach to the short time Fourier transform to overcome the resolution problem </li></ul></ul><ul><ul><li>Similar to STFT: signal is multiplied with a function </li></ul></ul><ul><li>Multiresolution Analysis </li></ul><ul><ul><li>Analyze the signal at different frequencies with different resolutions </li></ul></ul><ul><ul><li>Good time resolution and poor frequency resolution at high frequencies </li></ul></ul><ul><ul><li>Good frequency resolution and poor time resolution at low frequencies </li></ul></ul><ul><ul><li>More suitable for short duration of higher frequency; and longer duration of lower frequency components </li></ul></ul>April 16, 2011 Constituent wavelets of different scales
  24. Wavelet analysis of multifractal time series April 16, 2011 where   ,  (t) – function with zero mean centered around zero with time scale  and time horizon  . Family of wavelet vectors is created from mother function by displacement and scaling
  25. Time series f(t) representation as linear combination of wavelet functions April 16, 2011 where j o – a constant, representing the highest level of resolution for which the most acute details are extracted .
  26. Experimental results (wavelet analysis) April 16, 2011 Figure 5: The plot of changing maximum values detail coefficients Daubichies -12 expansion . Figure 6: The plot of maximum differences.
  27. Financial market model FIMASIM <ul><li>The main functional modules are: </li></ul><ul><li>FMSWorld, which contains virtual world classes and relationships, </li></ul><ul><li>FMSStandardRoles, which contains financial market classes, and others. </li></ul><ul><li>Standard classes of the system are: </li></ul><ul><li>Trader ( TFMTrader ) </li></ul><ul><li>Broker (TFMSBroker) </li></ul><ul><li>Company (TFMCompany) </li></ul><ul><li>Market, stock exchange (TFMSMarket) </li></ul><ul><li>Strategy ( TFMSStrategy ) </li></ul><ul><li>Plan ( TFMSPlan ) </li></ul><ul><li>Order , transaction request ( TFMSShareTransactionRequest ) </li></ul><ul><li>Transaction ( TFMSShareTransactiont ) </li></ul>April 16, 2011
  28. Virtual market program interface April 16, 2011
  29. The experiments were made with aim to find out at which values of parameters the market instability arises. Experiment 1: <ul><li>Overall parameters: </li></ul><ul><li>MARKET_MAKER_TRADER_COUNT = 2; </li></ul><ul><li>RANDOM_TRADER_COUNT = 0; </li></ul><ul><li>FUNDAMENTAL_TRADER_COUNT = 500; </li></ul><ul><li>BROKER_COUNT = 5; </li></ul><ul><li>MARKET_COUNT = 1; </li></ul><ul><li>COMPANY_COUNT = 10; </li></ul><ul><li>CLASSIFICATORS_COUNT = 31; </li></ul><ul><li>Companies: </li></ul><ul><li>COMPANY_MAX_ASSETS = 50000000; // 50Mbyte </li></ul><ul><li>COMPANY_MIN_ASSETS = 1000000; // 1Mbyte </li></ul><ul><li>  </li></ul><ul><li>Brokers: </li></ul><ul><li>MIN_BROKER_MARKET_ACCOUNT_MONEY = 100000; // 100k. </li></ul><ul><li>MAX_BROKER_MARKET_ACCOUNT_MONEY = 150000; // 300k. </li></ul><ul><li>BROKER_MONEY = 10000; // 10k. </li></ul><ul><li>Broker and market: </li></ul><ul><li>MAX_COMMISION_PLANS = 3; </li></ul>April 16, 2011   Market maker trader parameters: MIN_MM_TRADER_CHANGE_PERCENT = 0.1; MAX_MM_TRADER_CHANGE_PERCENT = 0.5; Random Trader parameters: MIN_RANDOM_TRADER_PORTFOLIOS = 0; MAX_RANDOM_TRADER_PORTFOLIOS = 5;   MIN_RANDOM_TRADER_MONEY = 50; MAX_RANDOM_TRADER_MONEY = 2000;   MIN_RANDOM_TRADER_ACCOUNT_MONEY = 200; MAX_RANDOM_TRADER_ACCOUNT_MONEY = 1000; MIN_RANDOM_TRADER_PORTF_ITEM_PRICE = 20; MAX_RANDOM_TRADER_PORTF_ITEM_PRICE = 3000;   MIN_RANDOM_TRADER_RISK_AMOUNT = 0.01; MAX_RANDOM_TRADER_RISK_AMOUNT = 0.25;
  30. Program realization April 16, 2011 Minimum, maximum and average price changes Price time series Real price and fundamental price distributions Minimum, maximum and average price distributions
  31. Experiment 2: <ul><li>Overall parameters: </li></ul><ul><li>MARKET_MAKER_TRADER_COUNT = 2; </li></ul><ul><li>RANDOM_TRADER_COUNT = 0; </li></ul><ul><li>FUNDAMENTAL_TRADER_COUNT = 500; </li></ul><ul><li>BROKER_COUNT = 20; </li></ul><ul><li>MARKET_COUNT = 1; </li></ul><ul><li>COMPANY_COUNT = 10; </li></ul><ul><li>CLASSIFICATORS_COUNT = 31; </li></ul><ul><li>Companies: </li></ul><ul><li>COMPANY_MAX_ASSETS = 15000; // 50Mbyte </li></ul><ul><li>COMPANY_MIN_ASSETS = 10000; // 1Mbyte </li></ul><ul><li>  </li></ul><ul><li>Brokers: </li></ul><ul><li>MIN_BROKER_MARKET_ACCOUNT_MONEY = 100000; // 100k. </li></ul><ul><li>MAX_BROKER_MARKET_ACCOUNT_MONEY = 150000; // 300k. </li></ul><ul><li>BROKER_MONEY = 10000; // 10k. </li></ul><ul><li>Broker and market: </li></ul><ul><li>MAX_COMMISION_PLANS = 5; </li></ul>April 16, 2011 Market maker trader parameters: MIN_MM_TRADER_CHANGE_PERCENT = 0.5; MAX_MM_TRADER_CHANGE_PERCENT = 0.7; Random Trader parameters: MIN_RANDOM_TRADER_PORTFOLIOS = 0; MAX_RANDOM_TRADER_PORTFOLIOS = 3;   MIN_RANDOM_TRADER_MONEY = 10; MAX_RANDOM_TRADER_MONEY = 200000; MIN_RANDOM_TRADER_ACCOUNT_MONEY = 200; MAX_RANDOM_TRADER_ACCOUNT_MONEY = 1000; MIN_RANDOM_TRADER_PORTF_ITEM_PRICE = 20; MAX_RANDOM_TRADER_PORTF_ITEM_PRICE = 3000; MIN_RANDOM_TRADER_RISK_AMOUNT = 0.01; MAX_RANDOM_TRADER_RISK_AMOUNT = 0.5;
  32. Price time series. Experiment 2 April 16, 2011
  33. Experiment 3: April 16, 2011 Overall parameters: FUNDAMENTAL_TRADER_ MARKET_MAKER_TRADER_COUNT = 2; RANDOM_TRADER_COUNT = 250; COUNT = 250; BROKER_COUNT = 5; MARKET_COUNT = 1; COMPANY_COUNT = 10; CLASSIFICATORS_COUNT = 31; Companies: COMPANY_MAX_ASSETS = 50000000; // 50Mbyte COMPANY_MIN_ASSETS = 1000000; // 1Mbyte   Brokers: MIN_BROKER_MARKET_ACCOUNT_MONEY = 100000; // 100k. MAX_BROKER_MARKET_ACCOUNT_MONEY = 300000; // 300k. BROKER_MONEY = 10000; // 10k. Broker and market: MAX_COMMISION_PLANS = 3; Market maker trader parameters: MIN_MM_TRADER_CHANGE_PERCENT = 0.1; MAX_MM_TRADER_CHANGE_PERCENT = 0.5; Random Trader parameters: MIN_RANDOM_TRADER_PORTFOLIOS = 0; MAX_RANDOM_TRADER_PORTFOLIOS = 2; MIN_RANDOM_TRADER_MONEY = 500; MAX_RANDOM_TRADER_MONEY = 5000; MIN_RANDOM_TRADER_ACCOUNT_MONEY = 2000; MAX_RANDOM_TRADER_ACCOUNT_MONEY = 7000; MIN_RANDOM_TRADER_PORTF_ITEM_PRICE = 2000; MAX_RANDOM_TRADER_PORTF_ITEM_PRICE = 4000; MIN_RANDOM_TRADER_RISK_AMOUNT = 0.01; MAX_RANDOM_TRADER_RISK_AMOUNT = 0.10;
  34. Price time series. Experiment 3 April 16, 2011
  35. <ul><li>THANK YOU </li></ul><ul><li>ANY QUESTIONS? </li></ul>April 16, 2011

×