wilmott.com Serving the Quantitative Finance Community 2023-06-01T00:31:20 https://forum.wilmott.com/feed 2023-06-01T00:31:20 2023-06-01T00:31:20 https://forum.wilmott.com/viewtopic.php?t=102868&p=875831#p875831 <![CDATA[Technical Forum • Absence of long-dated bond repo market: why ?]]> Do you know why there is no long-dated bond repo market altogether ?

From this, the next question is this: what if we wanted to do a long-dated bond forward for instance, what repo would we use ? Simply flat extrapolation from short-dated observable repo rates ?

Statistics: Posted by woodsdevil — Today, 12:31 am

]]>
2023-05-31T21:52:07 2023-05-31T21:52:07 https://forum.wilmott.com/viewtopic.php?t=102812&p=875829#p875829 <![CDATA[Book And Research Paper Forum • Re: My Dinner with ChatGPT]]> Statistics: Posted by Paul — Yesterday, 9:52 pm

]]>
2023-05-31T18:48:25 2023-05-31T18:48:25 https://forum.wilmott.com/viewtopic.php?t=102812&p=875828#p875828 <![CDATA[Book And Research Paper Forum • Re: My Dinner with ChatGPT]]> In “Chain of Thought Prompting Elicits Reasoning in Large Language Models,” we explore a prompting method for improving the reasoning abilities of language models. Called chain of thought prompting, this method enables models to decompose multi-step problems into intermediate steps. With chain of thought prompting, language models of sufficient scale (~100B parameters) can solve complex reasoning problems that are not solvable with standard prompting methods.

Comparison to Standard Prompting
With standard prompting (popularized by GPT-3) the model is given examples of input–output pairs (formatted as questions and answers) before being asked to predict the answer for a test-time example (shown below on the left). In chain of thought prompting (below, right), the model is prompted to produce intermediate reasoning steps before giving the final answer to a multi-step problem. The idea is that a model-generated chain of thought would mimic an intuitive thought process when working through a multi-step reasoning problem. While producing a thought process has been previously accomplished via fine-tuning, we show that such thought processes can be elicited by including a few examples of chain of thought via prompting only, which does not require a large training dataset or modifying the language model’s weights.

+ toy examples..

Statistics: Posted by Cuchulainn — Yesterday, 6:48 pm

]]>
2023-05-31T18:29:36 2023-05-31T18:29:36 https://forum.wilmott.com/viewtopic.php?t=102812&p=875827#p875827 <![CDATA[Book And Research Paper Forum • Re: My Dinner with ChatGPT]]> Feels like cargo cult science and a cop out,
Requirements engineering for dummies?
just a 1st impression. Nothing new under the sun. Ecclesiastes 1:9,

Statistics: Posted by Cuchulainn — Yesterday, 6:29 pm

]]>
2023-05-31T13:40:03 2023-05-31T13:40:03 https://forum.wilmott.com/viewtopic.php?t=102812&p=875826#p875826 <![CDATA[Book And Research Paper Forum • Re: My Dinner with ChatGPT]]>
fluent Julia code to implement ADE have still failed,

what's the issue? Can you post your code?

BTW what's prompt engineering?
Seems Julia and PDE go well together.
Let’s leave my inadequacies in coding and dealing with PDEs aside for the moment. “Prompt engineer” may well be the fastest growing technical career at the moment. The role entails designing queries to efficiently (or at least effectively) use large language models in a business context. I highly recommend this free class, which comes with a Jupyter notebook with a live connection to the API:
https://www.deeplearning.ai/short-cours ... evelopers/

Statistics: Posted by bearish — Yesterday, 1:40 pm

]]>
2023-05-31T09:57:44 2023-05-31T09:57:44 https://forum.wilmott.com/viewtopic.php?t=102812&p=875825#p875825 <![CDATA[Book And Research Paper Forum • Re: My Dinner with ChatGPT]]>  fluent Julia code to implement ADE have still failed,

what's the issue? Can you post your code?

BTW what's prompt engineering?
Seems Julia and PDE go well together.

Statistics: Posted by Cuchulainn — Yesterday, 9:57 am

]]>
2023-05-31T09:49:10 2023-05-31T09:49:10 https://forum.wilmott.com/viewtopic.php?t=99702&p=875824#p875824 <![CDATA[Technical Forum • Re: Breakthrough in the theory of stochastic differential equations and their simulation]]> I presented solution of stochastic integrals in post 690 and 693 here: https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=690#p827246
I have not presented the proof of those formulas but I will give friends an idea how to solve those iterated stochastic integrals. It is very embarrassing to admit but when I started out to solve for those integrals, I very naively thought that in iterated stochastic integrals with repeated dz(t) and dt, these integrals commute. Only later when I simulated the lognormal and other SDEs to higher order that I realized that these integrals do not commute.
Here in this post 689, I told friends that I had made an error and my earlier thoughts that stochastic integrals commute and resulting calculations were wrong.
https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=675#p826905
Then I went to blackboard again and found out that my method to evaluate dz integrals with Ito-isometry like formula with variances was very right but stochastic integrals that ended with dt were wrong.
I wrote this post four days later and gave the correct formulas. Post 690 here: https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=675#p827224
For reference, here is the original post # 32 where I claimed that stochastic integrals should commute. The method suggested in that post only works for dz-integrals and not on dt-integrals. Here is the original post: https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=30#p782089
Sometime after writing that post, I started working on ODEs and stopped the work on SDEs which I restarted later. I was forcefully detained several times in that duration.
Those dt integrals that could not be directly evaluated had to be first converted to dz integrals as below and then we could use ito isometry like formulas to solve for them and get exact results.
Then just like we approach    the formulas [$]\int_0^{t} z(s) \, ds \, =\,\int_0^{t} \, d[\, s \, z]\, - \int_0^{t} \, s \, dz(s) \, [$]
I applied that to hermite polynomials as

[$]\, \int_0^{t} H_n(z(s)) \, ds \, =\,\int_0^{t} \, d[\, s \, H_n(z(s))]\, - \int_0^{t} \, s \, dH_n(z(s)) \, [$]
where second integral on RHS can be solved with ito-isometry like formula. So I had to replace dt integrals with [$]dz(t)][$] or [$]dH_n(z(t))[$] integrals which could be solved easily.
Using above recursions given in post 693, you can solve for a very large class of stochastic integrals by representing arbitrary polynomial expressions of z(t) in terms of hermite polynomials and then use above recursions.
Here in post 697, I have given a toy example how you could solve for integral [$]\, \int_0^t \, z(s)^4 \, ds[$]. Following the logic in  that example you can easily solve for a very large number of stochastic integrals. : https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=690#p827488
I recall reading a scholarly paper in which author had calculated above integral [$]\, \int_0^t \, z(s)^4 \, ds[$]  with great difficulty but you can very quickly solve it by representing it in a hermite polynomial form and then applying the stochastic integral solution recursions of post 697.

Another thing I want to mention that iterate integral formula with repeated Ito is completely general and can be applied to any univariate or multivariate SDEs or systems of SDEs. But you have to generalize it according to the problem. For example in stochastic volatility SDEs setting when we have two different variables in a term as can happen that in volatility term of asset there could be a power of asset and also a power of volatility. In such cases, you apply Ito product rule instead of Ito change of variable formula and successive application of Ito product rule would convert the original SDE into large number of terms with constant integrand evaluated at initial time and then all we need is to solve for the appropriate stochastic integrals. It is a bit tedious but straightforward.
I was not going to write a full-fledged stochastic volatility program and thought most people would do it on their own after looking at my research on strictly one dimensional SDEs. I wrote stochastic volatility program only because I needed a correct reference program which can be used to find the true distribution of the SV SDEs and I wanted to compare results from my experiments with other analytic methods that did not use any pseudo-random numbers.
Again here is the link to general Stochastic volatility SDEs program: https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=1200#p867829

Statistics: Posted by Amin — Yesterday, 9:49 am

]]>
2023-05-31T03:19:05 2023-05-31T03:19:05 https://forum.wilmott.com/viewtopic.php?t=96800&p=875822#p875822 <![CDATA[Off Topic • Re: is twitter for mentally ill people?]]> Well, they are long and talking their book. Do I hear 10%?

Statistics: Posted by bearish — Yesterday, 3:19 am

]]>
2023-05-31T03:07:53 2023-05-31T03:07:53 https://forum.wilmott.com/viewtopic.php?t=102812&p=875821#p875821 <![CDATA[Book And Research Paper Forum • Re: My Dinner with ChatGPT]]> Statistics: Posted by bearish — Yesterday, 3:07 am

]]>
2023-05-31T02:43:20 2023-05-31T02:43:20 https://forum.wilmott.com/viewtopic.php?t=102812&p=875820#p875820 <![CDATA[Book And Research Paper Forum • Re: My Dinner with ChatGPT]]> Statistics: Posted by bearish — Yesterday, 2:43 am

]]>
2023-05-31T02:33:29 2023-05-31T02:33:29 https://forum.wilmott.com/viewtopic.php?t=101543&p=875819#p875819 <![CDATA[Politics Forum • Re: Time for BREXIT FAQ]]> Statistics: Posted by bearish — Yesterday, 2:33 am

]]>
2023-05-30T22:44:49 2023-05-30T22:44:49 https://forum.wilmott.com/viewtopic.php?t=73543&p=875818#p875818 <![CDATA[Off Topic • Re: New Zealand According to ppauper]]> I'vebeenspendingmymoneyIntheold townIt'snotthesameppauperWith you not aroundI've been spending my timeIn the old townWe sure miss you ppauperNow you're not aroundYou're not aroundThis old town***Ppauper, ppauper, ppauper?

Statistics: Posted by Cuchulainn — May 30th, 2023, 10:44 pm

]]>
2023-05-30T21:55:20 2023-05-30T21:55:20 https://forum.wilmott.com/viewtopic.php?t=89607&p=875817#p875817 <![CDATA[Off Topic • Re: bad hair day]]> Next European Championship of Mullet Haircut to take please Sept.9-10th in Creuse department, France

Statistics: Posted by tagoma — May 30th, 2023, 9:55 pm

]]>
2023-05-30T21:34:01 2023-05-30T21:34:01 https://forum.wilmott.com/viewtopic.php?t=99702&p=875816#p875816 <![CDATA[Technical Forum • Re: Breakthrough in the theory of stochastic differential equations and their simulation]]>
1. Monte Carlo simulation of Stochastic Differential Equations.

In order to simulate an SDE with variable drift terms and variable volatility term, we apply Ito formula on variable drift and variable volatility terms and find  an equivalent expression for each of the variable terms comprising a stochastic integral with constant integrand first term evaluated at initial value and several variable integrand terms under iterated stochastic integrals. We again apply Ito formula on variable integrand terms under the stochastic integral sign  to convert them into constant integrand terms evaluated at initial values and further variable integrand terms under higher order iterated integrals. After N repeated application of the above procedure, we obtain an  Nth order discretization of the SDE  comprising a large number of constant integrand terms evaluated at initial values and we also get some N+1 order terms with variable integrands under the iterated integrals. We can easily evaluate the all the constant integrand terms up to order N under iterated stochastic integral signs and neglect the rest N+1 order variable integrand  terms. All the constant integrand stochastic integrals can be analytically solved using hermite polynomials. This process can be repeatedly carried out to achieve high degree of accuracy in monte carlo simulations of the SDEs. Since number of terms involved in higher order expansions increases very fast and cannot be easily done with hand, I distributed an algorithm coded in matlab that calculated all the stochastic integrals and their coefficients from constant integrand terms involved and these coefficients are later used in higher order simulations of  Stochastic differential equations.

In post 37 below, I described how to apply Ito change of variable formula on drift and volatility terms of the SDE and then substitute them in the original integral representation of the SDE. I also explained how to repeatedly apply the Ito Change of variable formula on variable integrand terms for higher order simulation of the SDEs. This post 37 was written on Monday, May 02, 2016 1:43 pm. I think due to forum adjustments, proper formatting of this post is lost but you can still properly read the equations in which Ito change of variable formula is repeatedly applied.
https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=30#p782234

I later stopped working on SDEs and applied the same idea on solution of ODEs. I started working on SDEs again after quite some time and then wrote another post describing how to expand the integral solution of an SDE to higher order by repeatedly applying Ito Change of variable formula. This post 564 is similar to post 37. Post 564 was written on Thu Nov 23, 2017 10:48 am.
https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=555#p816432

When I wrote the above post, I had only successfully expanded the SDE into constant integrand iterated stochastic integrals but I still had not given the proper analytic formulas for the solution of iterated stochastic integrals.
I was only able to solve for various iterated stochastic integrals whose integrands were constant values evaluated at initial starting time. I wrote this post 690 written on Thu May 10, 2018 10:38 pm where I gave analytic expressions for solution of stochastic integrals
https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=675#p827224

One day later I, latexed the formulas given in post 690 and wrote them again. This was done in post 693 written on Fri May 11, 2018 6:08 pm
https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=690#p827246

Here in post 736, I presented a program based on above research that would evolve density of an SDE without pseudo random numbers using a non-branching tree for underlying normal driving density. This program would automatically do repeated Taylor expansions of SDEs with two drift terms and one volatility term and would also automatically solve for all stochastic integrals involved. This program had exact behaviour for one evolution/simulation  step of the non-branching tree but its multi-step behaviour with deterministic non-branching tree was flawed . As it turns out when we simulate with pseudo-random numbers, if the SDE does not have explicit dependence on time, we always simulate the SDE at the start of interval as if we are starting from time zero. So while multi-step simulation algorithm was not good for analytic non-branching density tree, its one-step version was perfect, precise and ideal for Monte Carlo simulations with pseudo-random numbers. However, it was only a few weeks later, when I started using the one step simulation scheme in monte carlo simulations. Again the algorithm and its explanation were given in post 736 written on Mon Jul 02, 2018 10:56 am here.
https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=735#p830547

It was the algorithm in above post that a lot of friends copied from my thread and distributed around. It would discretize for any arbitrary SDE with two drift terms and one volatility term without explicit time dependence in the SDE.
I later used the algorithm given in post # 736 for monte carlo simulations for the first time in a matlab program distributed in post # 773, written on Sun Nov 04, 2018 6:34 pm given here: https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=765#p837313
In the above post, I simulated both bessel process version of the SDE and original coordinates version of the SDE with monte carlo simulations employing pseudo random numbers.
Here in post 891, I presented the same monte carlo simulation algorithm but all the binomial loops have been removed and all the various integrand terms are directly written as a summation. It is the same monte carlo algorithm as old but all the terms in expansion are written directly without any looping. Here is the link to post  891  written on Sat Mar 14, 2020 5:54 pm : https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=885#p855539
Here is posts 892 and 893, I have earlier collected all my posts written about monte carlo simulations and associated matlab programs.
Post 892:  https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=885#p855649
Post 893: https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=885#p855653

Here in post 1172 and 1173, I presented ideas about expansion of high dimensional monte carlo simulations like we have for interest rate derivatives and equity baskets.
Post 1172: https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=1170#p866762
Post 1173: https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=1170#p866774

Here in post 1213, I have presented a higher order monte carlo program for very general system of correlated system of asset and SV SDEs.
Asset SDE is of the form
[$]\, dX(t)=(a X(t)^{\alpha_1} + b X(t)^{\alpha_2}) dt + \sqrt{(1-\rho^2)} \sigma_1 \, V(t)^{\gamma_V} \, X(t)^{\gamma_X} dZ1(t) + \rho \sigma_1 V(t)^{\gamma_V} X(t)^{\gamma_X} dZ2(t)[$]
while volatility SDE is of the form
[$]dV(t)=(\mu_1 V(t)^{\beta_1} + \mu_2 \, V(t)^{\beta_2}) \, dt + \, \sigma_0 \, V(t)^{\gamma} dZ2(t)[$]
Here is the higher order monte carlo simulation program for above general correlated system of SDEs written on Fri Aug 13, 2021 1:04 pm. Here is the address of post 1213:  https://forum.wilmott.com/viewtopic.php?f=4&t=99702&start=1200#p867829

2. Initial Value problems of first and higher order ODEs and systems of ODEs.

Interestingly, I used the same basic ideas for solution of ODEs and SDEs. The common original idea involves taking iterated integrals of higher derivatives and then solve for stochastic integrals (in case of SDEs) and deterministic integrals (in case of ODEs). These integrals can easily be solved since their integrand is a constant value evaluated at initial time.

I will be making a separate post about my research work during last two years.

Statistics: Posted by Amin — May 30th, 2023, 9:34 pm

]]>
2023-05-30T20:58:11 2023-05-30T20:58:11 https://forum.wilmott.com/viewtopic.php?t=73543&p=875814#p875814 <![CDATA[Off Topic • Re: New Zealand According to ppauper]]> Air New Zealand to weigh passengers before they board the airplane

Always travel with laxatives would be my advice.

Statistics: Posted by tagoma — May 30th, 2023, 8:58 pm

]]>