Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Algorithm

  • To: mathgroup at smc.vnet.net
  • Subject: [mg30072] Algorithm
  • From: Yannis.Paraskevopoulos at ubsw.com
  • Date: Thu, 26 Jul 2001 01:20:08 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi all,

lately I've been trying to translate to mathematica the following 
algorithm and it seems that everything is horribly slow and frustrating 
to a degree that I think that your kind help will be necessary.

The algorithm goes like that:

1)define t_i=2*i/100 ,i=1,2,...,500
  and X_t0=X

2)for j=1,2,...,10,000

	Do
		a) generate x_i  from N(0.05,1),p_i from N(0,1) and  

		   let y_i be 0, with probability 0.9 and 1 with probability 
0.1
		b) calculate ln(X_t(i))=ln(X_t(i-1))+(x_i)+(y_i)*(p_i)
		
		c) for the smallest i<=500 such that ln(X_t(i))<=0 set 
			W_j=1-0.4*X_t(i). Otherwise W_j=0

3) calculate final=1-Sum[W_j/10,000, {j,1,10,000}]

any help will be much appreciated.

best regards

yannis


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.
 
E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.



  • Follow-Ups:
  • Prev by Date: Re: Memory Leak
  • Next by Date: Re: Re: Thickness Isn't Thickness
  • Previous by thread: 3D Line Directives Bug?
  • Next by thread: Re: Algorithm