Serving the Quantitative Finance Community

 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

March 22nd, 2023, 10:53 am

Friends, since I have already worked on similar ideas related to Z-series and Hermite polynomials representation of data and I am reasonably familiar with most concepts involved, I have decided to write similar programs for U-series and Legendre polynomials including Legendre and U-series representation of data by matching moments as we did for Z-series representation of data. I will also write a program to extract Legendre coefficients from data using inner product with Legendre polynomials when standard Uniform density is wrapped on data through equivalent CDF. This second method would work well when we could have large number of data points while earlier mentioned method of matching moments could work well even when we have just a few data points. 
I will also try to write programs that convert a U-series variable into U-Series of its functions through Taylor series around the median of density. And finally write a program for orthogonal regressions of various data variables on each other through Legendre polynomials basis functions.
I have done very similar work for Z-series and hermite polynomials so most of the work should not take more than 3-4 days. I hope I will be able to finish the work before next antipsychotic injection is due.

Please do read my post on last page that I wrote earlier today.
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal
 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

March 23rd, 2023, 7:47 am

Friends, I hate to say this again and again but I would really like to tell people that bad people in American army are more determined than ever about my persecution. If they tell friends anything like that they are decreasing my mind control, they are brazenly lying and deceiving good people. They have absolutely no intention of decreasing my mind control and they are bracing for the long haul while buying time at the moment.
Before I tell people how I know about their intentions, I would like to mention a few related things. 
When I go out in the city to take food and buy anything, mostly I use a motorcycle to move around within the city. I had very rarely used motorcycle for past twenty years and previously always used my car. When I went to live in Kot Addu twice in winters of 2021-2022, I started using motorcycle to drive around  countryside around Kot Addu in pleasant weather. When I came back to Lahore after winter of 2021-2022, I started using motorcycle in Lahore once in a while in early morning or late evening when it would be pleasant. And then prices of petrol increased from Rs. 80 per liter to Rs 250 per liter and I started to use more of the motorcycle to save money.  I would still use my car a lot but avoid taking it out when going to a close by neighborhood of the city. And when I went to Kot Addu again in winters of 2022-2023, I again used motorcycle a lot to move around in pleasant weather and really enjoyed it. After coming back to Lahore in Jan 2023, I started using the motorcycle all the time since weather has also been pleasant. Now I rarely use my car and just use the motorcycle to even go to remote areas of the city. This really helped me since there are a large number of relatively less affluent but still bustling neighborhoods in the city where streets and relatively narrow and crowded and you cannot take your car there but easily move around on the motorcycle. Earlier I was limited to only parts of the city where there were good roads and Pakistan army knew very well most of the places where victims like me could go and buy food and other things so they would quickly drug any food place or sometimes the entire markets on the main roads. But when they drugged ground water and bottled water(of all companies including Nestle, coca-cola etc.) earlier this year, I was able to buy good water from manufacturing dates of last year since I would take my motorcycle into maze of relatively narrow streets and markets and would be able to buy good water lying at shelves at many places. I could never have survived if I were using my car and only trying larger roads in the city. There are very large number of such interconnected streets in the city where markets are bustling but you cannot drive a car there. So against all odds, despite that all the ground water and newly manufactured water was drugged, I still had no difficulty in getting good water.
Now I love driving my motorcycle in the city even though most people who are conscious of status in our country would never drive a motorcycle and some even might look down at people driving motorcycles but I am just in love with this. My only worry is that it would become very difficult to go out on motorcycle in the sun when harsh summer arrives in a month.
Now coming to the point how motorcycle made it difficult for them to keep me under mind control. In my car, they have miniscule devices everywhere(in the seats, in the roof and in the mirrors and everywhere else)  for mind control and they have a very controlled environment (as they an keep releasing gases) and the victims remains firmly in control. A car cannot go to small streets. On every large road in the city, Pakistan army has installed EM waves mind control infrastructure to keep the victim in control. This EM waves mind control infrastructure had not been installed in smaller roads of most residential areas(where no mind control target lives) and narrow streets and markets of the city.
At this point I want to tell friends that among other things that are done to mind control victims, it is made sure by mind control agents to not let a victim connect his brain to special parts of the brain that have the most brilliance. EM waves travel at the speed of light but most neurotransmitters in our brain travel very slowly. When a special neurotransmitter starts to move to connect the remaining brain to special parts of the brain, mind control agents already know since they get a signal instantaneously at the speed of light at fast neurotransmitters and they use EM waves resonance to stop (and kick out of the pathways) the special neurotransmitter that had started to move to connect the brain but long before it had succeeded. This way several mind control agents make sure that victim is never allowed to connect his functioning brain to special parts that have the most intelligence and brilliance. Every neurotransmitter that tries to connect is kicked out of its pathways before it had succeeded to connect.
So the point about going to smaller roads and narrow markets is that since Pakistan Army had not installed EM Mind control infrastructure on those parts of the city, when I would go there, many times my brain would start connecting to special parts and connect-reconnect in its own natural ways. This creates a great problem for the mind control agents to control the brain perfectly.
Now I want to tell friends another special thing about mind control. It is known to me for more than ten years that when I go to some road or place with very special mind control, the bottom of my pants get charged and I have an exaggerated sensation when my pants rub with my legs. Even I an feel hair on my legs rubbing with the cloth of the pants. Otherwise in normal conditions, my legs would continue to rub with the cloth of the pants and I would absolutely not have any special feelings and hair on legs would also not have any feeling at all. But whenever I have this feeling, I know there is very special mind control here and I try to avoid that place.
Earlier when I would go to small roads in many adjacent residential areas and narrow markets, I would absolutely not have any special feeling of the sort I described above. But since past 7-10 days, I have started to notice that when I would drive on many many smaller roads in entire adjacent residential areas, and also in many narrow roads on my motorcycle, my legs would become very sensitive and I would have very exaggerated sensation of my clothes (pants) rubbing with my legs.
I really believe that within past one or two weeks, Pakistan army has installed special EM waves and mind control infrastructure in many more parts of Lahore city in areas that were not perfectly covered with mind control infrastructure. They have installed very special mind control devices all over those parts of Lahore city where mind control did not exist earlier since they think that lack of mind control infrastructure is one reason that I have continued to escape their mind control.
I would invite good people in America and Europe who have approach to influential European embassies to check on their own and they would get to know that mind control infrastructure on large number of smaller roads and entire neighborhoods have indeed been upgraded or newly installed by Pakistan Army on behest of crooks of Pentagon.
Even otherwise mind control is not decreasing. I complained yesterday that I am not allowed a good sleep by mind control agents but still to no avail. This night, I continued to sleep for a long time but my sleep was extremely poor and I was feeling tired after waking up and I could tell that they were trying to not let me have a good all night. They really try to induce poor sleep in their victims since a good sleep is very important for the brain. 
So I would really like to say to Good American people again that bad people in American army and their jewish backers are more determined than ever about my persecution. If they tell friends anything like that they are decreasing my mind control, they are brazenly lying and deceiving good people. They have absolutely no intention of decreasing my mind control and they are bracing for the long haul while buying time at the moment. American army has absolutely no intention of decreasing my mind control, they only want to increase it and take it to their desired perfect conclusion.
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal
 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

March 25th, 2023, 12:38 pm

Friends, I tried to write algorithm to compute U-series (expansion of random variables with respect to polynomial in Uniform variable) but I had little luck in devising any algorithm that works all the time. Therefore I decided to look for alternative ways to find U-series of arbitrary random variables. And I have some good ideas. If you can find expansions of your data in terms of a polynomial with variable with respect to any density, you can convert it to a polynomial with respect to (our version of) standard Uniform(also called a U-series). For example, if you have fitted first few moments to a Z-series (polynomial with respect to standard normal), you can directly convert your Z-series into a U-series. However describing an normal density variable (that sits on a squared exponential density) in terms of a polynomial in standard Uniform variable might take a (U-series) polynomial of far greater degree than the original Z-series expansion.
Once we have found the U-series, we can easily convert it into a series in Legendre polynomials with very simple algebra. For example if the U-series is of 8h order, we need to divide it once with respect to eighth order Legendre polynomial. This division will in general only eliminate the 8th power of U-series. The quotient will be the coefficient of 8th degree Legendre polynomial. Since we have matched the eighth power and eliminated it, the remainder will in general be a seventh degree polynomial in standard uniform variable( seventh order U-series). Now we will divide this seventh degree polynomial with seventh order Legendre polynomial to eliminate the seventh power of polynomial in uniform variable. The quotient of this division by seventh order Legendre polynomial would be coefficient of seventh order Legendre polynomial. And remainder will in general be sixth degree polynomial from which we will find coefficient of sixth degree Legendre polynomial after division and so on until we are left with a simple coefficient that will be the coefficient of zeroth degree Legendre polynomial. In fact, we can represent any ordinary polynomial in terms of coefficients of (any of the popular and common) orthogonal polynomials using this method. In polynomial space of same order of polynomials, they are all equivalent. 

To give friends some ideas about how to convert a standard normal variable (or any other density with continuous derivatives) into (our version of) standard uniform, I want friends to read some preliminaries including  few older posts where I have mentioned how to do this. 

Below I am directly copying the contents of this post so it is easier to read. Here is the original post 1637: https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=1635#p873552

I will copy contents of the above post below and then explain how a Z-series can be converted directly into a U-series in the next post. This means that if we are given a polynomial representation of our data in terms of polynomial in powers of standard normal, we can describe the same data by a polynomial in standard uniform. Preliminaries first and then I give the details in next post.

The idea is to expand standard normal and its powers as a Taylor series in (our version of) standard Uniform variable. The derivatives of Z with respect to U of all orders required for this Taylor expansion are found by  simple analytics related to change of density derivative of standard normal density with respect to standard uniform density. Please read the copied post below and I explain the ideas in more details in next post in the context of conversion of Z-series in U-series.

Below is the copy of post 1637. 
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Friends, I had tried this idea earlier when I was finding Z-series of density from its moments in posts 1491 and 1492. But there I had tried to generate a base density from solution of linear equations applied to match the moments of the random variable. The idea of expanding any random variable with analytic density at its median and finding its derivatives with respect to standard normal random variable to from a Z-series of random variable was perfectly sound but the whole thing did not work as moments calculated from linear equations were totally rubbish.

https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=1485#p871047
https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=1485#p871049

Here I copy relevant parts of those above posts.

From post 1491:

Friends, we have earlier learnt when we want to represent a stochastic random variable X, in the form of a Z-series, the form of equation for X is given as
[$]X(Z)=a_0  \,+ a_1 \, Z + a_2 \, Z^2 + a_3 \, Z^3 +  a_4 \, Z^4 +\, ... [$] 

The first, second and third  derivatives of w(t) w.r.t Z are given as
[$]\frac{\partial X}{\partial Z}= a_1 \, + 2 \,a_2 \, Z +3 \, a_3 \, Z^2 +4 \,  a_4 \, Z^3 +\, ... [$] 
[$]\frac{\partial^2 X}{\partial Z^2}=  2 \,a_2 \, +6 \, a_3 \, Z +12 \,  a_4 \, Z^2 +\, ... [$] 
[$]\frac{\partial^3 X}{\partial Z^3}=  6 \, a_3 \,  +24 \,  a_4 \, Z \,+60 \,  a_5 \, Z^2 +\, ... [$] 

IF we do all the calculations of series evolution equation at median where Z=0. here all the derivatives are given only by leading coefficient associated with zeroth power of Z. So at Z=0,

[$]w(t)=a_0  \,[$] 
[$]\frac{\partial X}{\partial Z}= a_1 \,  [$] 
[$]\frac{\partial^2 X}{\partial Z^2}=  2 \,a_2 \, [$] 
[$]\frac{\partial^3 X}{\partial Z^3}=  6 \, a_3 \,  [$] 
[$]\frac{\partial^4 X}{\partial Z^4}=  24 \, a_4 \,  [$] 

So we have that 
[$]X(Z)=a_0  \,+ a_1 \, Z + a_2 \, Z^2 + a_3 \, Z^3 +  a_4 \, Z^4 +\, ... [$] 
[$]X(Z)=a_0  \,+ \frac{\partial X}{\partial Z} \, Z + 1/2 \, \frac{\partial^2 X}{\partial Z^2} \, Z^2 +1/6 \,  \frac{\partial^3 X}{\partial Z^3} \, Z^3 +1/24 \,  \frac{\partial^4 X}{\partial Z^4} \, Z^4 +\, ... [$]

So basically our power series is the same as Taylor series where derivatives between the two random variables, the stochastic variable X and standard Gaussian Z, are calculated at the median. ( You could do these calculations at other points in the density as well but those calculations would be much more involved and if correct should yield the exact same final result if the density is based on continuous derivatives)
If we could just find the median of density of our random variable X and its derivatives [$]\frac{\partial X}{\partial Z}\,  [$], [$]\frac{\partial^2 X}{\partial Z^2} [$] and other higher derivatives with respect to Z, we can find coefficients of our power series representation of our random variable X in terms of powers of standard Gaussian.
Again the above derivatives would have to be calculated at median of densities of both random variables, X and Z. 


From Post 1492:

As we learnt in the previous post, In order to construct the Z-series of a particular stochastic random variable X, we have to find its various derivatives with respect to standard Gaussian at the median(of both densities). So our first step towards construction of a Z-series representation would be to find median of the stochastic random variable X in question. I suppose that we have constructed analytical density of X using one of the methods described in previous post. We would have to find median mostly through Newton-Raphson as there are usually no simple formulas for median of a density.

After finding median, we can fix first coefficient of Z_Series as 
[$] c_0 \, = \, Median [$]

Both our density for random variable X and the standard gaussian density are related through change of variable formula for two densities as

[$]p_Z(Z) \, = \, p_X(X(Z)) \, \frac{dX}{dZ} \, [$]   Eq(1)

So we can find [$]\, \frac{dX}{dZ} \, [$] at median from the ratio of densities of respective variables at median as

[$]\, \frac{dX}{dZ} \, = \, \frac{p_Z(Z=0)}{p_X(X(Z)=c_0)}= \, \frac{p_Z(0)}{p_X(c_0)}[$]

In order to find higher derivatives of X with respect to Z at median, we differentiate Eq(1) on both sides w.r.t Z as

[$]p'_Z(Z) \, = \, p'_X(X(Z)) \, {(\frac{dX}{dZ})}^2 +  \, p_X(X(Z)) \, \frac{d^2X}{dZ^2}\, [$] Eq(2)

In above equation and similar subsequent equations, we know the derivatives of gaussian density at Z=0 analytically. And we can easily find all first few nth derivatives of density of random variable X at its median   [$]\frac{dp^n_X}{dX^n}(X(Z)) = \, \frac{dp^n_X}{dX^n}(c_0) [$]  from the analytic density as we have constructed in the previous post.  So we know values of all variables in Eq(2) other than  [$]\, \frac{d^2X}{dZ^2}\, [$]  whose value we back out from Eq(2)

The third derivative equation would be

[$]p''_Z(Z) \, = \, p''_X(X(Z)) \, {(\frac{dX}{dZ})}^3 +  \, 3\, p'_X(X(Z)) \, {\frac{dX}{dZ}} \, {\frac{d^2X}{dZ^2}} +  \, p_X(X(Z)) \, \frac{d^3X}{dZ^3}\, [$] Eq(3)

which can be used to back out  [$] \, \frac{d^3X}{dZ^3}\,[$]

Similarly we can continue to differentiate Eq(2) and keep finding value of next higher derivative of X w.r.t Z at median. 
After finding first few derivatives of X w.r.t Z at median, we can construct the Z_series of X as

[$]X(Z)=a_0  \,+ \frac{\partial X}{\partial Z} \, Z + 1/2 \, \frac{\partial^2 X}{\partial Z^2} \, Z^2 +1/6 \,  \frac{\partial^3 X}{\partial Z^3} \, Z^3 +1/24 \,  \frac{\partial^4 X}{\partial Z^4} \, Z^4 +\, ... [$]

In a similar spirit, I think we can take the base density as a different density (could be gamma density) and represent some stochastic variable as a series in Gamma density variable by equating the equations of two densities through change of density derivative at their median.  
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal
 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

March 25th, 2023, 1:37 pm

Again, the idea is to expand standard normal and its powers as a Taylor series in (our version of) standard Uniform variable. The derivatives of Z with respect to U of all orders required for this Taylor expansion are found by  simple analytics related to change of density derivative of standard normal density with respect to standard uniform density.
If we could know derivatives of standard normal variable Z with respect to standard uniform variable U, at a common CDF point preferably at median of two densities, this Taylor expansion would be given as

[$]\, Z(U)\, = \, Z(U_0) \, + \, \frac{dZ(U_0)}{dU} \, (U \, - \, U_0)  \, + \, \frac{1}{2} \, \frac{d^2Z(U_0)}{dU^2} \, {(U \, - \, U_0)}^2[$]
[$]  \, + \, \frac{1}{6} \, \frac{d^3Z(U_0)}{dU^3} \, {(U \, - \, U_0)}^3\, + \, \frac{1}{24} \, \frac{d^4Z(U_0)}{dU^4} \, {(U \, - \, U_0)}^4 +  \ldots [$]

One might have to consider that converting from an exponential measure to uniform measure might require reasonably large number of derivatives. But if you want to represent your data in uniform measure (and in related Legendre polynomials), you might have to sacrifice some brevity associated with polynomial representation associated with standard normal measure. I have to understand that this is usually related to data itself and if I directly fit the data that is (normal-like enough), I will still need a large degree of polynomial in standard uniform to fit the data (It does not have to do with that we are converting Z-series to U-series) A higher order representation in uniform series  is a feature of the data.

It turns out that we can easily find the derivatives   [$]\, \frac{dZ(U_0)}{dU} [$] , [$]\frac{d^2Z(U_0)}{dU^2}[$] ,  [$]\frac{d^3Z(U_0)}{dU^3}[$] and all other higher derivatives. Though we can expand around any point on both standard normal and standard uniform density associated with a common CDF, I would generally prefer to almost always expand around points associated with median of both densities. In standard normal and in our version of standard uniform, both these densities have a median at zero.

For functions of standard normal variable (As Z-series representation of a random variable is a polynomial function of standard normal variable), we will use a version of Taylor given as below. Here [$]Z_0[$] is point on normal density associated with expansion point [$]U_0[$] and I would prefer that [$]Z_0[$] and [$]U_0[$] both are median of respective densities (and hence associated with common CDF). Particularly  [$]\, f(Z(U_0)) \,= \, f(Z_0) [$]

[$]\, f(Z(U))\, = \, f(Z(U_0)) \, + \, \frac{df(Z_0)}{dZ}\, \frac{dZ(U_0)}{dU} \, (U \, - \, U_0)  \, + \, \frac{1}{2} \, \, \Big[ \frac{d^2f(Z_0)}{dZ^2}\, \big[\frac{dZ(U_0)}{dU} \big]^2 +\,\frac{df(Z_0)}{dZ}\, \frac{d^2Z(U_0)}{dU^2}  \Big] \, {(U \, - \, U_0)}^2[$]
[$]  \, + \, \frac{1}{6} \,\Big[ \frac{d^3f(Z_0)}{dZ^3}\, \big[\frac{dZ(U_0)}{dU} \big]^3 +3 \,  \frac{d^2f(Z_0)}{dZ^2}\, {\frac{dZ(U_0)}{dU}} \, {\frac{d^2Z(U_0)}{dU^2}} +\frac{df(Z_0)}{dZ}\, \frac{d^3Z(U_0)}{dU^3} \,\Big] \, {(U \, - \, U_0)}^3\, +  \ldots [$]

In the next post, I explain how to find derivatives of standard normal with respect to standard uniform by relating standard normal density to standard uniform density through change of variables derivatives between both densities.
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal
 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

March 25th, 2023, 3:25 pm

From the change of variables between continuous probability distributions, we can find the relationship between standard normal density and standard uniform density ad derivatives between their variables. If [$]g(Z)[$] represents standard normal density and [$]f(U)[$] represents standard uniform density, we have

[$]g(Z) \, = \frac{1}{\sqrt{2 \, \pi}}\, \exp(-.5 \, Z^2)\,[$] 

and 
[$] f(U) \, = \, \frac{1}{2} [$] for [$]\, -1 \, \geq \, U \, \geq \, 1[$]  zero otherwise

Through change of variable derivative relationship between densities we know that 
[$]g(Z) \, dZ \, = f(U) \, dU \,[$]
or 
[$]g(Z) \, \frac{dZ}{dU} \, = f(U) \,[$]
The above relationship is related through common cdf or common probability mass. For details please look up in wikipedia.
At a point related through common CDF, if [$]G(Z_0)  \, = \, F(U_0) \, \,[$] where G and F represent their respective CDF, we have

[$]g(Z_0) \, \frac{dZ}{dU} \, = f(U_0) \, \,[$]
or 

[$]\frac{dZ}{dU} \, = \frac{f(U_0)}{g(Z_0)} \, \,[$]
The above derivative is valid at common CDF points. In our expansions, we take this derivative at median of both densities which are both incidentally zero.

Sorry friends, but we cannot take higher derivatives of standard normal with respect to standard uniform. We cannot differentiate uniform density. We could have equated a zero derivative with second order derivative equation on other (standard normal )side but first hermite (which is derivative of standard normal density) also goes to zero at median. So we cannot find higher derivatives of standard normal with respect to standard uniform at median. 

Sorry for this since I was erroneously thinking we could take higher derivatives of standard normal with respect to uniform even if we could not take derivatives of uniform.

I would have to try some other way to solve this problem.

I still think that earlier exposition could be useful in many ways especially with densities that take continuous derivatives.

I will look at things more carefully and try to see how we can solve this problem.

It would be possibly interesting to see if using just first derivatives in Taylor series of functions of normal might possibly help us in getting a decent initial point for optimizations for U-series.
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal
 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

March 26th, 2023, 1:33 pm

Friends, I was thinking about the problem of finding the coefficients of Legendre polynomials that can well describe the data. And I had some very interesting ideas that I decided to share with friends. I will write a program based on these ideas but that might still be a week away but I am sharing ideas with friends. Some ideas might possibly have errors so please pardon if there are any errors.

These ideas can easily be applied to Legendre polynomials in Uniform measure and Hermite polynomials in gaussian measure. I believe these ideas can also be used in a reasonable way to find a very good guess that can be used with moment matching optimizations to fit the coefficients of orthogonal polynomials on normal or uniform distribution.

We start with the basic premises that whatever the distribution of data is, the variable in Legendre polynomial used to fit the data should (ideally) be a perfect uniform density after we invert the Legendre polynomial representation (or alternatively the U-series representation) of data. Similarly when a well-fitted Hermite polynomial representation (or its associated Z-series) is inverted, it should ideally give us a perfect normal distribution. Alternatively it means that Legendre polynomials and Hermite polynomials used to fit the data (and find their coefficients representing the data) are from true uniform and true normal distribution respectively.

 We first create the perfect uniform measure for Legendre polynomials and a perfect gaussian measure in case of hermite polynomials. If there are twenty points in the data and  we are assuming a perfect uniform distribution, each point should have probability equal to 1/20 and the grid should be equidistant as well. Similarly in case of a perfect gaussian distribution we will need a twenty points grid so that probability mass in each grid point is 1/20 but these grid centre points would be very close to each other around the median and very far from each other in the tails since they are dictated by a discretized gaussian density. These are both discretized version of perfect uniform and perfect gaussian density. We use these discretized versions of Gaussian density and uniform density to form discretized versions of Hermite polynomials and Legendre polynomial in data. 

In reality the data is random and never equidistant or equiprobable ever but we use this idea of discretized version of the uniform and normal distributions as an ideal situation from which we find coefficients of respective polynomials by minimizing least squares.

Again if we have twenty data points, we sort them in increasing order and associate a uniform on discretized uniform density with each of the data points. 

First polynomial basis is linear in both hermite and Legendre and is given as distance from median of the density. But this first hermite/legendre polynomial is more difficult and usually its coefficient cannot be found by minimizing least squares. The coefficient of first orthogonal polynomial affects all of the higher polynomials and has to be selected by trial and error. We intend to start with a suitable number for coefficient of first hermite or legendre polynomial and then find coefficients of all of the higher order polynomials by least square minimization. We note how good the fit to data is for first few orthogonal polynomials. We repeat the process by perturbing the coefficients of first hermite/Legedre polynomial in the direction of better fit and regress higher order polynomials and again find least square fit to data. We choose the optimization associated with that coefficient of first orthogonal polynomial where fit to data from all polynomials least square fit is the best. So again first coefficient (of first orthogonal polynomial) is chosen by trial ad error in direction of over all best fit  to data and rest of the higher order polynomial coefficients are fitted by minimizing least squares to data.

Again the choice of coefficient associated with first hermite/Legendre polynomial is the most difficult and basically pins the linear span of true Gaussian or Uniform density. 

Suppose we have twenty data points and we want to fit coefficients of Legendre polynomials to describe the data. The data is sorted in increasing order by 
[$]X_n[$] where n ranges from one to twenty. We have our ideally discretized uniform density with equidistant grid of twenty points and  1/20 probability mass in each grid cell. 
This Un would be centers of each equiprobable grid cells.
U(1)=-.95,U(2)=-.85,,U(3)=-.75,  ...  , U(10)=-.05, U(11)=.05, .... , U(20)=.95  
With each [$]X_n[$], there is associated a [$]U_n[$] so that 

[$]X_n \, - \, X_0 = c_1 \, (U_n \, - \, U_0) \, + R_{1,n}[$]

This [$]c_1[$] is chosen by trial and error and [$]R_{1,n}[$] denotes defect in fit of nth point with respect to first Legendre polynomial.

Now we choose coefficient of second Legendre polynomial by regressing the defect of data points from first polynomial to higher polynomials.
[$]c_2[$] is chosen so that expression below is minimized

[$]\sum_{n=1}^{n=20} \, {(R_{1,n} \, - \, c_2 \, L_2(U_n))}^2 [$]

Where [$]L_2(U_n)[$] is value of second Legendre polynomial associated with value of Uniform associated with nth grid cell on our idealized uniform density.

Once we have found coefficient [$]c_2[$] associated with second Legendre polynomial, we find further remainder as
 
[$]R_{1,n} \, - \, c_2 \, L_2(U_n)= R_{2,n}[$]

Now we fit third Legendre polynomial on this remainder from fitting of second Legendre polynomial by minimizing the following expression in least square sense as

[$]\sum_{n=1}^{n=20} \, {(R_{2,n} \, - \, c_3 \, L_3(U_n))}^2 [$]

This way we can fit as many Legendre polynomials as we want. If we fit m polynomials, we will get the following number for criteria of fit

[$]\sum_{n=1}^{20} \, {R_{m,n}}^2 [$]

But our choice of first coefficient [$]c_1[$] was based on trial and error. We now perturb the first coefficient and redo the whole procedure for fitting the coefficients on first m Legendre polynomials and note criteria of fit. We continue to perturb it in the direction of minimizing criteria of fit and this whole process is repeated again and again until criteria of fit statistic is minimized.

We have an ideal uniform measure for the underlying but data is usually too random and therefore we can get resulting coefficients of Legendre polynomials from above procedure and possibly use them as initial guess for moment matching procedure of the U-series.

Similar process can easily be used with normal distribution and hermite polynomials. In which we can arrange data in increasing order by sorting and then associate a discretized normal (on our perfect normal density with equal probability mass in each grid  cell.) We will have to choose coefficient of first hermite polynomial by trial and error and then choose the coefficients of higher polynomials by minimizing least squares. And repeating the whole process by perturbing c1 and redoing calculations of coefficients of higher hermites so that criteria of fit with the whole process is optimized.

I will have to get an antipsychotic injection in two days,  and I am travelling tomorrow to Islamabad, therefore it may take me a week or so to finish this program. I will be posting it here on the forum as always.
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal
 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

March 26th, 2023, 4:30 pm

Friends, I am travelling to Islamabad tomorrow and plan to stay there for a week. I am very sure that mind control agencies would start to drug food, beverages and water across Islamabad and Rawalpindi cities. Mind control agencies will also take other measures like possibly installing new mind control equipment to ensure that my mid control successfully continues. I want to request friends to use their sources to find out about all the steps mind control agencies will take to drug food and water and use other electronic means to ensure my mind control. I will also request European Embassies in Islamabad to keep an eye on new mind control activities in Islamabad and what Pakistan army is doing on behest of American army to continue my mind control.
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal
 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

March 27th, 2023, 9:40 pm

Friends, I have to write this post in middle of the night at 1:55 AM to protest about extremely high mind control tonight and the during the day earlier.
I was very tired and feeling extremely frail(as if I were 90) in the evening  and therefore decided to sleep very early. But there was some gas in my room and I would feel slightly short of breath and try to breathe very deep and fast and feel worse as I breathe. It is hard to describe these feelings since things like this are not common. In my room on first floor at my sister's house in Islamabad, there is a very large window in which both the glass and the wire-mesh are retractable and half of the window would be entirely open. I opened as much (half) of the window as I could open but I still could not sleep due to sickening gas.
They also continued to force  EM waves pulses into my right ear and I could literally hear a pulsating sound in the ear slightly similar to very loud throbbing of the heart.
Earlier I drove to Islamabad with my parents early in the morning. One reason to travel is that I would setup some of my trading programs on my nephew's computer. I was supposed to do it several months earlier but had repeatedly delayed travelling due to one reason or other. 
When I reached Islamabad my sister gave me some food that probably had mind control drugs in it. Mind control agents ask my family to drug my food and extremely play down everything as if there would be no consequences for me and it would just be a regular thing. Later during the day when I was feeling both good and lively in the office of my brother-in-law, they took some neurotransmitters out of my brain and I was as if I were going to fall due to weakness. I had a small tetrapack packet of milk in my bag and I had the milk right away and I was barely slightly better. I came back home and then went out to have some good food to feel better. I had some good food ad drinks and I was slightly better but I still had extreme weakness. People in my age do not know what it means to feel frail ( as if you were 90)  but I have experienced it very large number of times. When I feel frail due to mind control, I would be feeling so weak that it would be difficult to even walk. And worst of all, I would feel extremely weak in the brain. It is a feeling hard to describe for most of the people unless they faced some extreme disease that would be totally debilitating. 
I had a decent sleep for few hours after coming back home but I was still feeling bad at iftar dinner. I continued to feel very bad even after having food at iftar and tried to go out for a 600-700 meters walk (to nearby market and back) but I was feeling so bad that I could barely lift my steps and I was feeling very helpless. 
After coming back home, I decided to sleep again but really could not sleep due to gas as I have described at the start of this post. Despite trying my best, I could not sleep all night due to gases in my room.
Instead of any decrease in my mind control, American army has sharply increased my mind control. 
Due to its relevance, I am copying another old post for friends. Please read the next post as well.
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal
 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

March 27th, 2023, 10:02 pm

This is a part of post 1657 written earlier and I am copying it because of its relevance.

When I started telling people about mind control nobody believed me and only later most of them realized the truth about what I was trying to tell them. I want to tell friends that I would have been killed/shot in New York 25 years ago by some planted mugger (with complete planning) or would have been given poison when my talent was discovered and they failed to retard me since it was impossible for many people to stand or accept a Muslim with special neurotransmitters. I remained alive only because a large number of people in the university had already come to know about it and if I were killed, most of them would have known who was behind it. I bitterly wanted to remain in United States and work there but once I realized that most people wanted to retard me with an iron fist, I knew I had no future there and I decided to return to Pakistan and I know I made the right decision.
Later I remained alive since my family was assured when they cooperated that I would not be killed or made "special" and again a large number of people in my broader family, army and several influential people in Pakistan got to know about it. But the way people behind my persecution are becoming impatient again, I am seriously afraid they might do what they never did 25 years ago in New York. I am very afraid they might give money to some mugger to shoot me or create some other way to end my life with full cooperation and planning of Pakistan army. I want to tell friends very clearly that if I had premature seemingly accidental death, it would never be accidental, it would be a completely pre-planned murder. 

I have copied above post since I really felt during past ten days that mind control agents are becoming extremely impatient and have started to use tactics that they rarely use otherwise. For example, for several days in a row, I would feel pain in my heart and I was sure that mind control agents were doing it. They can in fact do it (have the technology for it) and have tried such things on me on some rare occasions in the past. In fact, I wrote it in one or two posts several years ago when they were trying to give pain in my heart.  
So they might as well be saying in a few weeks that Amin was very obese and have died due to heart attack. 
Though anybody can have a heart attack anytime, I would be fifty this September.
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal
 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

March 30th, 2023, 6:36 pm

Friends, after I wrote the previous post, my two nights wet relatively better and I had reasonably good sleep. But now when I came to my room to sleep from lounge where I was working, I again noticed that there is huge gas in my room. 
I really want to tell friends that scumbags of American army who are behind my persecution are too desperate to get into the paradise of Jewish Godfather and there is absolutely no way they can let me live with my human dignity. However hard good people protest to scum in American army, these scumbags are more determined than ever to continue my persecution.
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal
 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

March 31st, 2023, 6:24 pm

Friends, my persecution continues unabated. I continued to work today on trading models and I hope to end this work in another day or two and come back to Lahore and restart my research where I left it. 
So in the evening I was working on first floor of my sister's house when my father called on phone and said that he wanted me to be at home at iftar time and eat with everyone else. I wanted to avoid being at home but decided to stay at home and eat with the family. I was able to work very well with clarity before iftar but when I tried to work after iftar, I was horrified to notice that all my clarity (that had continued for past few days) was gone and I was unable to do any more work. 
I went out for half and hour and tried to get some good food but it did not help to regain my clarity. 
I decided to sleep early around 8:00 pm but mind control agents again had gas in my room and I could not sleep properly either. I tried to change my sleeping position by putting my head on back of the bed and legs towards the front(where we are supposed to place our head) but it did not help at all. 
Since I was unable to sleep, I decided to write this post and tell friends that mind control agents are bent on retarding me at all cost and they have absolutely no intention of letting me live with my full mind and with my human dignity.
I want to go back to sleep again but do not know whether they would let me sleep but I would try to write about it in the morning.
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal
 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

April 5th, 2023, 10:53 am

Friends, I returned from Islamabad and came back to Lahore on Sunday. I slept through rest of the day aft coming back to Lahore. 
I had an antipsychotic injection on last Wednesday and it has started to show its full effect. I slept for more than 14 hours both yesterday and the day before yesterday. I would wake up from deep sleep and feel better and then try to do my work but I would be completely exhausted and fatigued after twenty minutes of work and would go back to sleep again. This thing happened repeatedly over past two days.
Yesterday, when I woke up very early in the morning after a very long sleep, I was feeling somewhat better and decided to go for a walk. 
Usually I go for walk when two weeks have passed after the injections and I walk for more than two and a half hours in the morning.
I was thinking of a long walk as usual but only after fifteen minutes of walk, I was extremely tired and decided to return.
Mind control agents were probably also of the thought that I would walk for several hours as usual.
When I returned home and opened the screen of my newly bought used laptop, the screen would not open. I noticed that its hinge was broken and its holding screws had come out of their base in the screen. Outer plastic lining/casing that holds the screen had also come off and would start to roll over the keyboard as I would try to open the screen.
It seems when I decided to go for a walk, mind control agents also thought that I would be away for several hours and decided to install their spying and program altering gadgets on my laptop. But when I abruptly decided to return, They cold not put everything back quickly and broke the hinge of my computer.
My brother helped my fix the hinge by using slow binding adhesive magic and tried to put the screws of the hinge back in their casing and it worked for sometime. But the hinge got broken after a few hours and I have to open it very carefully. I can still use my computer but I am not sure how long can I continue using it since everytime I open it, its condition is worse.
I want to tell friends that mind control agents are completely resolved to continue my mind control to its perfect conclusion when they would have retarded me. That is the only reason they wanted to install thier equipment on my computer so that they can change my programs at will as they feel like. I am sure they already had full control of my computer but they wanted even larger control.
I re-wrote this post several times before hitting the submit button. Every time, I would write it, my screen would go blank and data would be lost. Either the movement in hinge is causing defect on my computer or they are trying  to stop me from writing this post.
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal
 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

April 5th, 2023, 11:24 am

Last night, I tried to fit a standard normal density with Legendre polynomials up to eighth moment. The fit to moments is close but fit to density is very off. Of course, higher moments might be very off.
I was just experimenting but it shows that densities on normal measure cannot be replicated by densities using Legendre polynomials as basis functions with respect to uniform density.  Standard normal is the simplest density so more complicated normal based densities are not a possibility at all with orthogonal polynomials with respect to uniform measure.


Here is fit to raw moments.

rMu =
     0     1     0     3     0    15     0   105
FittedMoments =
   1.0e+02 *
  Columns 1 through 3
                   0   0.010000000000000                   0
  Columns 4 through 6
   0.029639290354623                   0   0.157690924062288
  Columns 7 through 8
                   0   1.020776620351699

and here are the graphs. First the full graph
Image


This second graph is a close up zoomed version of the previous graph.


Image
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal
 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

April 6th, 2023, 5:45 am

Friends, I feel a bit better and slightly/partially out of the effect of injections and want to restart my research. 
First of all I want to try the method I suggested two weeks ago by choosing a base variance of first orthogonal polynomial and then finding values of coefficients of higher polynomials by minimizing least squares. I want to try this on both normal like densities and uniform like densities. I am also particularly interested in seeing if beta density random variables could be approximated by Legendre polynomial basis with respect to uniform density.
I want to recall that we were able to find representations of lognormal random variables and generalized gamma random variables in terms of a Z-series. I think generalized gamma density is associated with Laguerre polynomials but it can be well represented by a polynomial function of standard normal random variable. SO I had the hypothesis that we can represent variables of one density in terms of orthogonal polynomials or series in another density when derivatives of all order exist between two densities ( as we computed them ago by change of variables for densities). This is the case for normal-lognormal and normal-generalized gamma densities.
However I suppose beta density might not have derivatives of all order with respect to uniform density but shares the discontinuity at the end of the range of the uniform density.
I will try to program the method I suggested two weeks ago today and try it both for normal like densities and uniform like densities. I hope to be able to post the program sometime early this weekend.
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal
 
User avatar
Amin
Topic Author
Posts: 2157
Joined: July 14th, 2002, 3:00 am

Re: Breakthrough in the theory of stochastic differential equations and their simulation

April 9th, 2023, 4:30 pm

Friends, as I had mentioned that my laptop was damaged probably by mind control agents trying to fix gadgets in it in my absence. And I mentioned that my brother tried to fix it with adhesive but the repair did not last for more than a day and I had difficulty opening the laptop again. 
On friday morning when I woke up and tried to use my computer, it would not turn on. I asked my younger brother for help and he told me that the laptop's button to shut it down was getting pressed by the broken hinge and therefore laptop would not turn on. I asked him to try to fix it, and he agreed. He separated the screen, applied magic again and also loosened the hinges. He was also able to turn on the laptop earlier before doing all this operation. But when he assembelled the laptop again it would not start at all. He had tried his best but something had gone wrong. We decided to show the laptop to some professional to fix it. So on Friday evening my brother dropped the laptop with a repair shop to be fixed. This is my second laptop going bad in a month. I do not believe they had anything to do with problems in first laptop other than they tried to delay its repair but I am very sure they caused the problem in the new (used )laptop I bought.
Without the laptop yesterday and today, I decided to brainstorm and had some great ideas. I also thought about improving the calibration procedure that finds Z-series or U-series from data of moments. The earlier procedure was ad-hoc and I was able to think of a more elegant way of fitting the moments in a way that can be used by any set of orthogonal polynomials with respect to a density/measure. Obviously without my laptop, I have not been able to test  the procedure but I am confident it would work very well since it is based on common sense. I will be sharing it with friends in a new post after a few hours or possibly tomorrow.
I hope I will get my repaired laptop in a day or two and re-start normal working.
I am going to write a special next post and really want to request friends to read it and really help me if you can. 
You think life is a secret, Life is only love of flying, It has seen many ups and downs, But it likes travel more than the destination. Allama Iqbal