Serving the Quantitative Finance Community

 
User avatar
bizquant
Topic Author
Posts: 8
Joined: August 8th, 2012, 11:47 pm

Re: Random Walks In Force Fields

May 18th, 2017, 8:19 pm

It's not a matter of what is or is not a model but whether a given model has a prayer of offering reasonably accurate insights into the physical system of interest.  

Astronomers have no direct data on gravity but they can infer it's existence from its effects and build models of planetary motion that are much better than the epicyclic models they replaced.  And market modelers actually do have a lot of data on agent actions in the form of the order book, the order flow, and various news media streams.  Sure, the internal states of the agents may be hidden, but wouldn't you agree that a models of semi-stochastic agents submitting orders that then affect prices does a better job than assuming random exogenous price increments?  For example, I've created agent models, too, and they have the nice property of recapitulating the coupling between price movement and trading volume as well as showing boom and bust cycles in cases in which agents "believe" in momentum.
Completely agree. You are modeling the real physical market, and how transactions is occurred. In a sense, it is like a Particle Swarm, when agents all agree on something, asset bubble occurs.  I am based off the same thought processes, just eventually model the occurrence of a trade event. I can explain the density function of prices, but can not explain the volume. I actually tried your approach too. So I look at the volume / volatility relationship. It is promising. 
Image
Then I got stuck when deciding the # of agents -> which changes volume and vols. Also, each news can be interpret either good or bad. The direction of the agents is unknown too. But I think your approach is powerful that you can model volumes which in return reflect the manifested volatility. I can only look at "normalized behaviors" , i.e., fitted into vol ... or the total energy of a particle ball. Also bid/ask behaviors could be a great outcomes too. 

I think all of us touch upon a key point is that market is not completely random, as you called semi-stochastic agents. And the interaction between randomness and deterministic path is not what has dictated financial market  dx = u dt + s dW for the past couple of decades. 
 
User avatar
katastrofa
Posts: 7440
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Re: Random Walks In Force Fields

May 29th, 2017, 9:47 pm

It's not a matter of what is or is not a model but whether a given model has a prayer of offering reasonably accurate insights into the physical system of interest.  

Astronomers have no direct data on gravity but they can infer it's existence from its effects and build models of planetary motion that are much better than the epicyclic models they replaced.  And market modelers actually do have a lot of data on agent actions in the form of the order book, the order flow, and various news media streams.  Sure, the internal states of the agents may be hidden, but wouldn't you agree that a models of semi-stochastic agents submitting orders that then affect prices does a better job than assuming random exogenous price increments?  For example, I've created agent models, too, and they have the nice property of recapitulating the coupling between price movement and trading volume as well as showing boom and bust cycles in cases in which agents "believe" in momentum.
I think multi-agent models calibrated to historical order book data are not enough.
Microsimulations are apparently being used in finance by credit companies and banks for forecasting or testing economic interventions, but those obviously cannot be directly applied in real-time trading driven by instant regime-changes and traders' psychology.

A general microsimulation model for market trading, as I would design it, models the microdynamics of a system of traders (multi-agent, multi-level, complex and adaptive) interacting with each other and coupled to a stochastic environment (external world).

Modelling of the microdynamics of the system of traders requires taking into account their "psychology" (if it's not too big a word), namely the fact that a trader doesn't act absolutely predictably and reasonably: he doesn't follow models consistently, he makes mistakes, etc. - he is not a rat, but he is not a machine either. I think it requires using reinforcement learning for the calibration of the system parameter values to historical data.

The model would be calibrated to macro-data for different environments (market regimes), in which the system is immersed. A user would need to choose the regime (either based on some signals or purely empirically) for which they want to evaluate their strategy (in a similar fashion as it's sometimes done in other industries, e.g. airport risk control). I've worked (or currently work) on all those parts separately and could build a model combining them. It would be an interesting project, so if someone is interested, let me know.
 
User avatar
bizquant
Topic Author
Posts: 8
Joined: August 8th, 2012, 11:47 pm

Re: Random Walks In Force Fields

May 31st, 2017, 8:33 pm

Regarding multi-agents & multi-level structure, I would argue two difficulties:

1) Multiple agents & levels would eventually invoke Central Limit Theorem, rendering the results converging to Brownian processes. But it is how the natural deals with uncertainty. The follow two templates/theories could be the eventual results for multi-agents/levels models. 
https://en.wikipedia.org/wiki/Particle_ ... timization
https://en.wikipedia.org/wiki/Multi-armed_bandit

2) How macro data is interpreted by market participants is very subjective, to the extend almost random. Trump's victory, for example, was followed by market down turn in overnight futures market, but reversal the next day morning. You almost have to model Levy flight with 50/50 chance to go either way to deal with such Jump
https://en.wikipedia.org/wiki/L%C3%A9vy_flight

Arguments 1) and 2) suggested that such system could form a model full of parameters, but eventually converge to Brownian Process + Jump. Also, it does not address the issues with how cycles occurs in economies. 

Below comes my marketing pitch.. haha :D 
The full model has governing PDE: 
Utt  +  0.5 λ Ut=vUxx

The Ut leg is the diffusion portion, originated from mimicking how swarms search for optimal solution. The Utt leg is the wave portion. The v2 local diffusion is what differs from standard diffusion & wave equation where the kinetic diffusion is not adjusted by local energy. Here I am making a proposal that asset bubble, is not irrational exuberance. It is a reflection (by the market participants) of external events (macro momentary policies?) , similar to how a wave is formed. Excess is doomed to be accumulated somewhere, like a boundary condition to a wave problem. 

I understand the importance of modeling the real physical structure of the reality. But I also think that there could be just one formulation that governs physics, natural, and human society - which is what I am proposing here. The Klein-Gordon PDE, used in atomic physics, is also covered here. 

Below is a summary of ODE derivation -- Just definition of λ, Chain Rules + Space-time separation assumptions. It is shockingly simple to me. 

Image
 
User avatar
bizquant
Topic Author
Posts: 8
Joined: August 8th, 2012, 11:47 pm

Re: Random Walks In Force Fields

September 27th, 2017, 3:54 pm

Summaries regarding density function and skew existence
Image
Image
 
User avatar
bizquant
Topic Author
Posts: 8
Joined: August 8th, 2012, 11:47 pm

Re: Random Walks In Force Fields

October 2nd, 2017, 4:30 pm

I have been pondering if I can get another soul on earth to understand the proposal? :) I have 15+ years of Quant experiences, publication on top tier journal, and fluid dynamics & financial engineer backgrounds. So there should be some basic sanity check to the model.... (or so I hope? haha.. no guarantee though) The model has suggested a few trading strategies.  

Black-Scholes introduced diffusion process / random walks to explain the market. It also brings in the problems where the framework failed to explain finite entropy system such as stock market. The improved models, such as Vasicek, HW, HJM, etc, are patches over the term structure, which can not be extended back to physical world. The core limitation is in the Ito's Isomery. 

Ito's Isometry, dx^2 = v^2 * dt, conceptually is saying that heat flux / kinetic energy / variance flows at a constant rate to dt. The core adjustment in this proposal is to say that the Isometry should be corrected to a "local kinetic energy", instead of "constant energy". If we imagine particles bouncing off each other randomly, but attracted to each other by gravitational pull, it can be shown that the local kinetic energy is just like that of Hook's Law, dx^ 2 = (v^2 - lamda * x^2) dt. It is such as simple concept, but one has to challenge the un-challenge-able Brownian motion since 1800s, which inevitably introduces adjustments for 3rd Law of Thermal dynamics, and Particle physics --- Can anyone understand what I am saying here? Isn't it so straight forward? Have anyone wondered why force fields is never considered in random walks? (It was probably okay when dealing with hot gas where forces is negligible.)

To equate the behavior of stock prices bouncing between bid/ask, it is equivalent to particle bouncing between gravitational center to the left and right. From the summary in previous post, you can see such framework explains the density function precisely, which Brownian motion can not even try to fathom because of the limitation. Such model also explains why skew occurs -- like a moving particle ball. There has been no discussion nor observation as with why the tail tends to be on the down side when market goes up, and tails is on the upside when market goes down. Yet, with all these evidences, I seem to fail to open anyone's eyes. One professor said it is interesting, but not the same as main stream. One professor said it's physics. One said the math is too simple (i do have limited math skills :P lots of proof is loose). One said I don't have any references (I am a bit too lazy on this.. ha).

The core dX = (r - X) dJ + v dW can be viewed as "jump to mean", but it is more of, in essence, linearly superimposing the potential adjustments to the constant kinetic energy field on an expected basis. (It is in fact a form of Reaction Diffusion process often modeled in chemistry) To equates that concept in finance, it is that there is a penalty to deviate away from mean / market consensus. Market participants doe not know where the prices is, it is "probabilistically jump to new mean". The skew occurs when not all participants agree that market is going up or down. It is in our daily life too. There is always a propensity for us to go back home in the end of the day? It takes a lot of efforts to be different, such as this proposal too. All the valuation is based on some sort of comparisons? There is no complete freedom in society as Brownian motion suggested.

This is also the first time ever (to my knowledge) where Diffusion & Wave PDE can be combined in one simple equation. Utt + 0.5 lamda* Ut = v^2*Uxx. And the arrival rate Lamda * dt = - d K / K is the bridge assumption that applied to only Newtonian ODE + space/time separation, which is commonly assumed in solving diffusion & wave PDE. And it converges the Klein-Gordon PDE for free particles.  

I really hope someone could spend a little time to see what I am describing here. Perhaps the only way to prove that it works is to make money on trading based on the models? This is what I have been focusing on... ha.. 
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Random Walks In Force Fields

October 2nd, 2017, 4:44 pm

When the 2nd last human dies, economy dies with it, value of stocks etc is purely behavioural, and there is no point in trying to come up with laws. All you can try to do is find patterns in data.

Even something a simple as a single stock values is undefined, you can look at the last traded price, at bids and offers, but everything will change as soon as you try to interact.
 
User avatar
bizquant
Topic Author
Posts: 8
Joined: August 8th, 2012, 11:47 pm

Re: Random Walks In Force Fields

October 2nd, 2017, 5:23 pm

I do not disagree. Just think that even if stock is purely behavioral, it does not prove that there is no point to come up with some laws? Pattern in data is by definition some sort of deterministic logic? "One's behavior changing the market" precisely tells us that prices are not fully random and Brownian motion is not suitable --- it is just like each particle in the particle ball have influences on each other. 

Since you mention data mining, I have been wondering, supposedly a % of trading volume is used to move the market, while the rest is randomness. 
--- Utt + 0.5 lamda * Ut  = v^2 Uxx 
--- deterministic part + diffusion part = total trading volume 

This PDE offer me a glimpse into how to split trading volume. Some preliminary data testing seems to show some interesting trading strategy. I am using machine learning to test a bit at the moment --- hint : If you look at one of the previous post with regression on Volatility vs. Volume, you will see that the current market volume is mostly moving the market.. much more than historical level.

As you said, all these efforts might end up in vain... so far it has.. haha.. But thank God it provides me a getaway to horrible political news out there lately.. :)
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Random Walks In Force Fields

October 2nd, 2017, 6:51 pm

Yes, it's a fun distraction to work on models, a friendly abstract puzzle world!

In my view you can generalise much more -fit better to more complex data- if you start modelling the data directly instead of postulating a certain restrictive form with physical analogies? 

E.g. in your model your particle has a couple state variables: mass, momentum, both at the current time. But you can also build models with N states without any specific meaning other than that it models the data best, and who's state value depends non-linearly on past state trajectories. that would be much more generic and a less specific model choice. 

I thinks it more common in physics to postulate a certain model/law/behaviour because it would give us some underlying insight if true. It would also be "exactly true", and not a "reasonable fit". With financial time series you won't aim to uncover some deeper insight IMO, pure data driven approached seem a better fit.
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Random Walks In Force Fields

October 2nd, 2017, 7:21 pm

Here is a cool example of a very powerful model learning struture in data. This guy fed the LaTeX sourcecode of a algebraic stacks/geometry book to a neural network with 500 latent states.

The network learned to write random LaTeX documents, one character at a time (the analogy to time series would "generate a sample path, one daily return at a time" . Because of it's large number of states and its expressive power it was able to learn very complex long range temporal dependencies from the sample book, things like indenting, lemmas, matching closing brackets with opening brackets, english words,..  I learned all the LaTeX rules, and quite a bit of geometry terminology directly from data.

Here is a random character sequence it generates:
Image

Calibrating it to Shakespeare makes it spit out play like dialogs. Note subtle things like the headers lines ending with a colon, pragraphs followed by an empty line..
PANDARUS:
Alas, I think he shall be come approached and the day
When little srain would be attain'd into being never fed,
And who is but a chain and subjects of his death,
I should not sleep.

Second Senator:
They are away this miseries, produced upon my soul,
Breaking and strongly should be buried, when I perish
The earth and thoughts of many states.

DUKE VINCENTIO:
Well, your wit is in the care of side and that.

Second Lord:
They would be ruled after this chamber, and
my fair nues begun out of the fact, to be conveyed,
Whose noble souls I'll have the heart of the wars.

Clown:
Come, sir, I will make did behold your worship.

VIOLA:
I'll drink it.