Showing posts with label Finance. Show all posts
Showing posts with label Finance. Show all posts

Friday, 5 December 2014

UK Debt – what a load of nonsense… and Iraq… and everything!

Been on Facebook with this one continuously, can’t remember if its blogged. Just crudely throwing this together, but complete analysis shows the same picture…

Grabbing UK debt off Google… (1995 to 2013)… Debt has been stable or falling over a long period up to 2007. Then doubles from 2007 to 2010. Where did this debt come from? But firstly is it falling GDP?

image

UK GDP off Google… (1965 to 2013)… GDP falls 11%. So no that is real debt in the public purse.

 image

Famously there was an economic crisis in 2007. Debt famously was created in banks by them buying US mortgages that would never get paid off. Much of the debt was secretly parcelled in the infamous CDO (collateralised debt obligations). This is the official story.

So we have been told that the debt was created in the US housing bubble, that banks bought that debt, and that the UK government then bought the debt off the banks to rescue them from collapse.

So we know the debt came from the banks.

But the political parties in the UK, including Labour, seem to think it was normal government over-spending (welfare, health, education, defence etc), despite the fact they’ve told us that it was bailouts to the city, and that all the excess debt occurred since 2007.

Clearly the political parties, the media and indeed almost everyone is confused. Yet despite being confused they all agree. How is this possible?

It can only be that they’ve all been told to disagree with what they were saying. Obviously the banking sector is massive and powerful; actually the most powerful. The UK Conservative Party gets almost all its funding from the City. The “conspicuous absence” of The City in contemporary explanations of the UK debt. And the total lack of presence of the ostensible culprits means that this is a full scale “cover-up”.

We’ve seen it recently in the Iraq War (2003 to 2011). Originally Iraq was linked to 9/11. There was no evidence, and the US failed to mobilise its more sensible allies to involvement. Then they used the risk of Saddam’s weapons and their potential threat. SCUD D missiles have a maximum range of 600miles giving them access to targets in Turkey, Iran and Saudi Arabia (and of course Israel). Hardly a “clear and present danger” to either US or Europe. Satellite photos of trucks and buildings was presented to the UN as evidence of chemical weapons (no-one was fooled). The BBC criticised the government, was made to look like they did something wrong (in a “free” nation?), and has never been very compliant ever since, and two other critics also died (coincidence). However unfortunately (and inexplicably) some US allies did accept the idea that Iraq was a threat and the UN passed a resolution, and a war happened.

Obviously Hussein had long ago removed his weapons (which he was sold by France and Britain anyway), since he didn’t want to antagonise the US more than necessary; and predictably no WMDs were found. This was not the reason for the war anyway, just an excuse. Once WMDs were not found, and “no threat” was proven, the US didn’t apologise and withdraw, instead they executed Hussein (logical). The new “reason” became a humanitarian crusade to free the people of Iraq. Just as Alexander the Great did in the 4th Century BC. One wonders why they didn’t present this excuse to the UN in the first place. Despite this transparent sequence of events, the “conspicuous absence” of a sensible description by politicians and the media and the persistence of the idea that the war was “justified” is much the same as the denial of the source of the UK Debt. Rather unfashionably these are called “cover-ups”, but if they aren’t then the word should be removed from the dictionary because there is no better example of “cover-ups”. The Westminster Paedophile scandal which is exploding in slow motion in the UK gives some idea of the duration and water tight nature of the establishments ability to protect itself, cover-up and generate false news.

Personally I wouldn’t mind so much, but exactly the same establishment rejoices in the ability of other world leaders (conspicuously of enemy states/groups) to generate propaganda, while never acknowledging that it is perhaps the World’s best… but then which compulsive liar would ever admit they were a liar. (Politicians never tell the truth. I am a Politician.)

Serious Economics

Given that The City has got us into this fine mess, what options do we have? The standard Keynesian solution has been to buy our way out of recession, but we have been doing that since the dotcom bubble crash of 2000. But our modern economies only survive by continued, unending financial stimulus anyway. Its not a fix for times of crisis, it a fix for normal running these days! We can be sure that even if all “normal” government spending ends we will still be paying high taxes just to prop up the economy (stimulate inflation, keep people spending, create jobs, and direct bailouts like UK selling Gold in 2000 etc).

But if we don’t prop up the economy then the whole house of cards will come down. UK still has a housing bubble, much private debt is offset against the value of houses. If there is deflation, or market sentiment turns seriously bearish the crash will be catastrophic. There is the fear of UK borrowing costs increasing also, finally hoisting the UK on the petard it has terrorised the rest of the world with for several centuries. The ostensible panic solution has been to sell off more of the state; not much to privatise any more (though the NHS is being cut up bit by bit, like the rainforests), the only thing left is to divert tax money directly into the National debt.

The Party Faithful will say that this “panic” solution hasn’t come easily and the Conservatives are at pains to do it. But sceptics will see the long term Tory plan of sell offs and handing of power to their backers in the City.

Taking stock of the situation however, it’s all a bit odd. From Reagan and Thatcher to the relaxing of the Glass-Steagall and the UKs market liberalisation until today the path has been one of giving more freedom and money to the City and the markets. And where has it got us? People point to the great progress in technology (the telecommunications revolution, the miniaturisation of electronics and iPads) and the global markets with a greater variety of foods and cheaper clothing. But all this was happening anyway. In terms of fundamentals life since Thatcher has been harder. Real wages are lower. After the boom of council house sales, we now have a private housing system and an inevitable boom meaning that most people will never own a home; paying debt for the rest of their lives. Job security is lower, with competition from overseas markets, shorter more flexible contracts, and that same telecommunications revolution creating machines that have taken jobs. To the winners the dynamic nature of modern economics is a dream, but to the losers it is the worst nightmare. And this is reflected in the inexorable growth of inequality. While the rich, feasting on all those bailouts and financial support from the tax payer, celebrate; the tax payers (employees, and start up businessmen) who must shoulder all the burden of economic uncertainty and risk; they live lives of increasing difficulty.

And all this in an post-industrial technologically advanced economy existing 4500 years after the Neolithic economy had the surplus wealth to erect StoneHenge. Wealth and production haven’t been issues for mankind for 4000 years, and most certainly not the problem today. The problem, and the source of Mankind’s toil today is economics and its misuse (either through ignorance or design) by those who have the responsibility and the wealth to ensure it, not us, works!

So UK Debt? It’s a load of obvious nonsense.

Monday, 7 November 2011

Nature of Flagger/Coward Distribution

A linear function was chosen to describe the number of flaggers in a group, such that the total number of flaggers across all the groups was equal to the total number of cowards.

f(x) = a + x (n-2a)/g , where n is the total number of rabbits in each group, g is the number of groups and a is the number of flaggers in the 1st group. This integrates to ng/2 i.e. half the rabbits. The gradient of the function is given by grad=(n-2a)/g.
Using this as f(x) the expression Gc – Gf (from before) was calculated. This gives the average predator pressure experienced by flaggers relative to cowards for populations of heterogenous groups with varying numbers of flaggers and cowards as described by ‘a’.
Gf – Gc =
image

Substituting the expression a = (n-g*grad)/2 into the expression enables a clearer expression of heterogeneity.

Results
p=0.5, n=10, g=10
image
Once the gradient is steeper then 60% then flaggers experience rapidly decreasing predator pressure. This is a distribution with group one having 8 flaggers and 2 cowards, and group 10 having 2 flaggers and 8 cowards a range of {2,8}
For 50 groups (g=50) the graph has the same shape but the gradient only needs to be 12% before flaggers benefit more than cowards. The general rule is that the cut-off is proportional to 6/g.
p=0.5, n=20, g=10

image
For groups of large size there is little extra benefit to cowards until the groups have a larger range than {5,15}. After which there is considerable advantage to flaggers.
p=0.1, n=10, g=10
image
If the probability of not seeing the predator is very low (10%) there is range of distributions which benefit cowards very much. Suddenly when the range reaches {0.5,9.5} is benefits flaggers. 0.5 isn’t possible so there are no distributions which favour flaggers in small groups.
p=0.9, n=10, g=10
image
A simple curve where ranges {2.5,7.5} and steeper benefit flaggers. Flagging strategy is an anti-predator strategy and obviously only benefits where predators are skillful and not easily seen by individuals.
ConclusionFlagging as a strategy depends upon strong heterogeneity in flagger/coward ratios. Low dispersal of offspring i.e. children remaining in the warren will create such a heterogeneity. Sexual selection for flaggers is vulnerable to the evolution of a “slag” gene but may provide a mechanism for heterogeneity also.
Another avenue of investigation is in free markets. The local marginal strategy is always to defect and become a coward. However under certain situations strategies that benefit the group will lead to selection for groups of individuals who do not do this, i.e.e those who abandon local marginal thinking.

Friday, 27 May 2011

Loren Carpenter

Adam Curtis’ new documentary features an experimental game of Pong operated by the ratio of red and green paddles held up by each half of an audience. The experiment was performed on an minimally instructed audience by Loren Carpenter (of Pixar fame) in 1991.

Quote from Adam Curtis,

"It was like a switch went in my head," Curtis says. "Carpenter saw it as a world of freedom with order. But I suddenly saw it as the opposite – like old film of workers toiling in a factory. They weren't free – they looked like disempowered slaves locked to a giant machine screen. It was a video game, which made it fun, but it still made me wonder whether power had really gone away in these self-organising systems, or if it was just a rebranding. So we became happy components in systems – and our job is to make those systems stable."
http://www.guardian.co.uk/tv-and-radio/2011/may/06/adam-curtis-computers-documentary

Written up here.
http://www.capatcolumbia.com/reading%20packet/Out%20of%20Control.pdf

Comment:
Curtis’ analysis is naive. We are not individuals either free to pursue our “own” interests or individual caught within the web of group interaction… we aren’t individual at all! Each of us is the accumulation of interactions just as much as the game is the accumulation of individual interacting. It is fractal and hierarchical.

To reductio ad absurdum Curtis I need only point out that he is trapped within the confines of the collective understanding of English. Where is his “individual” if he frees himself from language? Where is the freedom in even generating media that necessarily requires an audience?

The experiment is interesting I need pursue it more. It may be useful to understand the stock market also especially the frequency of oscillations and size of movements induced by slower feedback (less volume), and the fact that bird flocks have faster response rates than individual birds so that groups adapt to signals faster than individuals! Really suggests that there are emergent “entities” (which is an oxymoron since we are discussing the dissolution of selves into groups so what sense in making groups just new individuals).

Technorati Tags: ,

Tuesday, 22 February 2011

Stock Market analysis update...


Here is the 1st attempt at implementing the IFS from that Chinese paper (which they misquoted from Barnsley)...

The paper fails to explain the importance of the "d" stretch parameters, and does not explain how they were discovered. I don't believe after searching that there is a set of "d" parameters that will recover the Shanghai stock trace as described in the paper. Is this another mistake in the paper, a failure on my behalf or deliberate fraud... don't know.

===

Rather than look at only the price some thought was given to the role of volume. The population of sellers and buyers in a market will change respectively in size and also in mean and standard deviation. This reasonably I assume does obey the normal distribution. Where the two curves over lap is where trading occurs. Large differences in mean will result in large shifts in price, with respective numbers of traders determining in whose favour the price goes, while large overlaps will result in large volumes of trades. Flattening standard deviations then are associated with large volumes, and different means correspond to price changes. Somehow deducing these parameters from the stock charts would be good insight into the markets...

===

Following the logic thought about the "stack price". The stack might be the pile of held stock. Some is for investment and will be held for a long time so is far down the stack, some is speculative and goes around quickly. Assuming that stock is traded only once a day then volume as a percentage of the total issued shares combined with the mid price of the day determines what the average holding of share holders is the next day, loosely called the volume weighted average price VWAP here.

It was thought the VWAP would give more information about the behaviour of investors than the chart price.

This is the number of days spent at each VWAP price for the BP-NYSE chart (prices are in 3dollars). There are very distinct prices to which the price returns and of interest (but not yet explored) is the fractal bifurcating peak in the middle. The whole peak is split into two in the same ratio as each prong is split into two. This is also a bifurcation tho no evidence for the Feigenbaum constant.







===

Again BP the frequency distribution of Volume and daily High-Low price on suitable X scales. Interesting how volumes and size of days range appear to obey the same law.











===



The Blue curve is the High/Low distribution the Magenta is the Poisson distribution. When have time it's another probability distribution search.









===

Conclusion still no decent attractors, or any real understanding of the stock market - 4 months coming up... should knock this on the head for a while... but give it 4 weeks more first.

Monday, 7 February 2011

Stock Analysis Notes

Change of direction (ironic ;-):

Measured the dimensions of some price series - using the counting boxes method (executed in Excel VBA):

FTSE 1.8241
BP 1.425
GKSR 1.1058

They are progressively less fractal.

Now for the FTSE and BP it seems that a velocity approach is not the most appropriate approach since dy/dx is not defined for fractals. While moving averages are appealing in watching trends: I wonder what theoretical foundation exists for their use now.

The shift in approach now (altho I will return to other approaches) is in search of attractors that drive stock charts.

===

This paper is exactly what I wanted to do all laid out tho I've not got the IFS to work yet:

===

From discussion board

As so many fields investigate variables which change over time, there is widespread interest in the analysis of time-series. Probably three of the most well-developed time-series specialties (there is sginficant overlap, despite varying terminology) are: business forecasting, spectral analysis and digital signal processing. For further research, try these keywords:

-Business Forecasting: "moving average", exponential smoothing, dynamic regression, deseasonalization, ARIMA, autocorrelation, correlogram

-Spectral Analysis: "Fourier transform", FFT ("fast Fourier transform), DCT "discrete cosine transform", wavelet, coherence

-Digital Signal Processing: FIR ("finite impulse response"), IIR ("infinite impulse response"), Wiener

Of course, many other, more generic, techniques have been applied to time-series. I suggest an on-line search for terms like "fuzzy logic" or "neural network" in combination with time-series terms such as "forecast", "prediction" or "denoise".

Friday, 28 January 2011

Fibbonaci: Little Evidence

Well finally got around to looking for evidence of Fibbonaci retracement in stock markets... which would have been the logical place to start this investigation ;-)

BP (LSE) data from 2003 to 2011 was used.

Data was transformed into a simple stochastic oscillator STO: price as a percentage of High/Low range for the preceding period (p).

1) Method: The number of days in at each percentage point was summed.

Result: With p=10,20 the graph has 3 noticeable points.
i) Price spends most of its time just below the High >80% (about 1.2% of the time for each STO percentage point). This is near a subtracted Fib point.
ii) Price spends the next longest duration (0,.75% time / STO point) at about 20% of the range. This is near one of the Fib points.
iii) Price spends the least time (about 0.6%) in the middle of its range.

Conclusion: This crude measure would expect movement to Fib levels to show up as longer time at these levels with the price moving fast through other levels. This is not in the data. However bouncing off these levels would not show up in this measure.

2) Method: The Gradient was calculated as the regression slope between the preceding week and the subsequent week.

Result: Gradients are negative and fastest near the Low and positive and fastest near the High. They oscillate in the middle band. A moving average smooth of the curve shows that they are flat at 60%. This is a Fib level.

Conclusion: The flat level at 60% is as expected. The data is not fine enough to conlcude anything however. It also suggests that movements out of the range occur at high speed, while there is fluctuation within the range. Little peak at 70% suggests that prices travel fast through here to the 60% range and 80% range.

3) Method: Same but with average volume.

Result: Volumes decline as the price moves up through the range, with a peak before 20%. Thus suggests that people trade based on ranges like this with buyers buying in expecting the price to rise again into the range and sellers afraid that it will fall below the last low.

4) Same with Volume x Gradient

Result: Movement into stock positions increases as the price rises and accelerates upward as it approaches tops. Peaks at 35% and 70% of range.

Conclusion: No evidence of Fib here. It suggests that it is safe to add into high volume upward trends even near the local high because the gradient down is less. Conversely it is dangerous to add to low volume downward trends... as I discovered in gas last year where I threw away 20% of my portfolio!

Now there are two ways to do Fib. Time to examine the other one.

===

Taking the trend into account with High/Low calculated from the previous 40day period gives these results. It was calculated on actual prices of the BP graph not on LN - that was a mistake above. After a falling trend the SSTO was calculated normally, but after a rising trend the 100-SSTO was calculated since Fib retracement is calculated from the most recent reversal point back in time.

Fib retracement means that prices bounce off the retracement lines which means that days with this closing price ought to be rarer than random.

Instead the below trend is found which is essentially a probability distribution as this measure actually captures the volatility!










Rather than days at each level the average absolute gradient (calculated as regression through each point and week either side). This measures the rate at which the price was changing (either going up or down) at each point. At Fib levels, if they do resist movement, the gradient ought to slow down.

The 3 middle black bars are the main Fib levels (38.2,50,61.8) with 78.6 an official additional and 23.6 a logical 5th.

With some imagination there are periodic sudden increases in gradient (sudden acceleration) before Fib levels but certainly no indication of a slowing down.

Next up would be a distribution of turning points... but given that the stock market is fractal and turning points occur ever second, minute, hour, day... what scale do we chose? and how do we approach the issue of scale?... it is not exactly a 3rd dimension since scales are discrete (we choose maybe a 9day, 20 day, 50day moving average) but which scale would be best and why? .... to come back on this one.


Friday, 21 January 2011

Finally the Phi answer

http://math.ucr.edu/home/baez/week203.html


ebook
http://ebook30.com/science/mathematics/305483/introduction-to-the-perturbation-theory-of-hamiltonian-systems.html


Back to more my type of analysis of stock markets ...
http://finance.martinsewell.com/stylized-facts/distribution/Gabaix-etal2003.pdf

esp. "Such a theory
where large individual participants move the market is consistent
with the evidence that stock market movements are dif®cult to
explain with changes in fundamental values." [Cutler,D., Poterba, J. M.& Summers, L. H.What moves stock prices? J. Portfolio Management 15, 4±12 (1989).]

Excellent something workable really seems to be building here.

It gets deeper...

This Phi thing is extra-ordinary. Self-relationship at the heart of the universe... I still maintain the SRH but there is a lot more to Self!!!

http://icanseefar.tripod.com/phitheoryweb.htm

and just as I accept Caitin's argument I'm beginning to see Wolfram's and this is before I've even read the book! Amazing, and probably stupid, that I assume so much about things I've never read... but I guess if you hear someone calling from over the hill you go over there even before they've come to fetch you!

===

ok this guy might be talking a load of rubbish the sqrt(10) thing is a tautology... shall examine later

Now we're talking...

Brilliant discussion of this feature here...

http://scienceforums.com/topic/13548-do-a-spiral-galaxy-and-a-hurricane-share-a-similar-formation-mechanism/

Virtually every aspect of fractal geometry and type of dynamical system can be expressed by variations upon the simple quadratic iterator: X = X**2 + c which expresses the particular type of feedback being examined, Phi can be expressed by a related but more archetypal variation to derive the Fibonacci series: X[n+1] = X[n] + X[n-1] which incrementally gravitates towards a particular ratio which possesses unique qualities. Numerically, it can be derived from the relation: (1 + sqrt(5))/2. For example, if one diminishes Phi by Unity you derive its reciprocal. Additionally, Phi is the unique ratio that fulfils: 1/Ø + 1/Ø**2 = 1 in other words, Phi is also the only possible geometric and arithmetic, expansion and partitioning of One.This leads us to the other cardinal feature of Phi. There is only one proportional division of One possible using two terms, with the third being One itself. From Euclid's ELEMENTS Book Five, Theorem Three (Alexandria, 3rd century B.C.):"A straight line is said to have been cut in extreme and mean ratio when, as the whole line is to the greater segment, so is the greater to the less."The Golden Mean then, is an archetypal fractal in that it preserves its relationship with itself (its inherent similarities under scaling are conformal symmetries - with topological consequences, that are invariant about themselves), in the most mathematically robust, economical but also elegant, way. It is analogia exemplified.As we shall see, this reciprocal, squaring behaviour about One, or Unity, as it is more properly termed, is far from being mathematically trivial.All feedback loops deterministically involve the passage of time. The quadratic iterator is derived from Newton's differential calculus, and from a period when nature was seen as a mechanistic and time-reversible automaton. Recent science demonstrates that in fact it consists of both the above and irreversible processes, known as the entropy barrier, or the arrow of time. The Golden Mean can also be seen as mathematically (because of the above) the simplest and most stable way of communing or mediating between the two, as we shall see.Nigel Reading
Quote
You may assume.But it is never safe
Quote
According to the Nobel laureate Ilya Prigogine, these far from equilibrium dissipative systems locally minimise their entropy production by being open to their environments --- they export it in fact, back into their environments, whilst importing low entropy. Globally, overall entropy increase is nevertheless preserved, with the important caveat that the dissipative system concerned often experiences a transient increase (or optimisation) of its own complexity, or internal sophistication, before it eventually subsides back into the flux.This is known as the region of alternatively, Emergence, Maximum Complexity, Self-organised Criticality, Autopoiesis, or the Edge of Chaos. (Nascent science debates nomenclature routinely - and appropriately, in this case, the crucial point being that they are all different terms for essentially the same phenomena.)Lifeforms, ecosystems, global climate, plate tectonics, celestial mechanics, human economies, history and societies, even consciousness itself - all manifest this feedback-led, reflexive behaviour; they maximise their adaptive capacities by entering this region of (maximum) complexity on the edge of Chaos, whenever they are pushed far from their equilibrium states, thereby incrementally increasing their internal complexity, between occasional catastrophes.Remarkably, this transition zone is mathematically occupied by The Golden Mean. This ratio acts as an optimised probability operator, (a differential equation like an oscillating binary switch), whenever we observe the quasi-periodic evolution of a dynamical system. It appears in fact, to be the optimal, energy-minimising route to the region of maximum algorithmic complexity, and to be a basin of attraction for the edge of Chaos.


[credit Nigel Reading]

Monday, 10 January 2011

Planets, Fractal, Phi and Stockmarkets

Following up on the Ouroboros stuff from ages ago, which is related to the SRH thread, and through an article on Alchemy I came upon the presence of Phi in the planetary orbits. Odd I think and am trying to explain that becauise it is also used in charting stock markets. It is commented already that stock markets show fractal geometry, and Phi is the limit of the relationship between adjacent numbers in the Fibonnaci Sequence - a sequence that is gained by recursion i.e. fractal! Consider two systems A and B which proceed by adding the value of the other system - this is the Fib sequence. A and B can start at any value (as long at they are different).

A 10 24 etc
B 14 38

They will come into Phi relationship ... why? Algebraically it is obvious:

B(n) / A(n) = [ B(n-1) + A(n) ] / A(n) = B(n-1)/A(n) + 1 (ok not quite I've got this in notes will update)

Anyway looking further this is interesting and I note it for reading later:
http://www.cyberalley.com/G-Home/R&D/R&D5/FofL12.html

===

http://www.ermanometry.com/

===

Funny how everything appears to fit together ... or is this an illusion because I want it so? Actually I don't want it so because if Phi is this fundamantal then it will end up explaining things rather than being explained!

http://www.miqel.com/fractals_math_patterns/visual-math-phi-golden.html

So it seems that in iterative processes the repeating units come into Phi relationship *for some reason*. This link describes it as "self-reference" - I don't call it self reference because it isn't. A large structure being composed of structures "similar" at many scales is only "self" in the sense of "similar". Altho I must conceed that a set which is made of copies of that set at a smaller scale is more extraordinary than one that is made from dissimilar material. This really questions what we mean by "self". What we don't mean (a la Buddha) is a material existing thing called self. Fractals actually illustrate this "self" that is built from "copies" of "itself", and so not self and self at the same time.

But why Phi?

Web site here were the writer seems a little carried away with the patterns. If there was no pattern that itself would be amazing. It is Wolfram versus Caitin on whether the universe is full of information or whether the apparent diversity has underlying rules. I part company on ths page and this statement "There is no natural explanation for these unusual relationships" [http://solargeometry.com/34power.htm]. I reckon there is a very good reason. 2 options. Either:

(1) the planets formed in this relationship and it is a feature of the fractal collison and amassing of dust in the emryonic nebula + the expulsion of massive rocks that were too excentric and out of phase with the system. OR

(2) over time the planets have evolved into this relationship. Evidence for this would be that the inner planets (with more revolutions and periods of evolution) have tighter relationships.

Some things to note. All the planets bar Earth are in a 2*Phi relationship. Mars is the most deviant. And there is a missing planet (from the pattern) between Mars and Jupiter, where instead is the asteroid belt.

Jupiter, Saturn and Uranus are massive and it seems likely to me that the planet that formed immediately inside jupiter's orbit suffered some catastrophe and either never formed properly, was broken up by the gravity of Jupiter or there was some massive early collision creating the asteroid belt. Mars, which is incredibly light, will be hugely affected by Jupiter and aided by early collisons from the drama in the asteroid belt has a distorted orbit.

However such speculation leads no closer to why Phi.

The inner planets are in almost circular orbits. This is most likely the influence of Jupiter which I understand would accentuate any eccentric orbits and eventually fling the planet from the system. By simple evolution only circular orbits exist. Given radius from the Sun, and assuming nearly circular orbits, the possible velocity and therefore orbit period are hugely constrained for the planets. I need develop my calculus a bit before describing that in detail.

Then it remains only to find out why only certain radiuses from the Sun are favoured for planet formation and stability.

I expect the iterative dynamics to be something of the form Sqrt(x+1) = x or x = 1/(x-1) both of which converge on Phi...

Then I have a demonstration of my hunch that a similar iteration exists in the Stock Market game mentioned a few posts ago. After all the stock price is what speculators base there trading on, and their trading affects the stock price so there is an iterative system and ergo it will show fractal geometry (with patterns feeding back through the system at scale) with stable points existing at solutions to these interations ... like Phi.

Tuesday, 4 January 2011

Do Big Caps Pay?

A revealing look at two large caps. Above is Tesco and below is BP for data between 2003 and end 2010. The Magenta line is the actual stock price.
The Blue line is data corrected for percentage change in the FTSE for that day:

C(n+1) = C(n) * S(n+1)/S(n) * F(n)/F(n+1)

= S(n+1) / F(n+1) * F(0)

C(x) = corrected price for day x
S(x) = stock price for day x
F(x) = FTSE price for day x

Assuming that the FTSE grabs the general economic data, including growth and inflation, then the remaining graph is the actual performance of the stock. What is surprising is the low return of only around 50% in 8 years or 5% per year. This is admittedly growth on top of inflation (which the FTSE data ought to remove) but it isn't impressive given that a careful trade can gain you 5% in a day. There was 9% just today on an oil stock in my portfolio (RRL) that I have held for only 6 months; that against the FTSE of only 2%. That's equivalent to 16 months investing in Tesco! I must thank a friend for alerting me to the potential of oil stocks at this time.

Monday, 3 January 2011

Essence of Trading


Just writing a very simple sampling program to test various trading strategies on actual stock data: this seems the most productive way forward at the moment - characterising the "nature" of stock movements is a bit to complex for me at the moment!!

Ideas stripped down look like this.

Trading is a game which involves stepping between two side-by-side conveyor belts, which constantly change their rate and direction.

It is simpler to consider one (money) as static and the other (stock) as moving (though this makes the difference a more complex function). We step from money into stock, travel a bit and then step back.

The object of the game is to get as far up the money escalator (to the right) as possible as this escalator is next to all the other escalators (can buy anything with it).

The optimum solution (to be tested) is to be in Cash as the stock escalator passes to the left and then to step onto the escalator as it changes direction and starts to move right. We leave a doughnut or something to mark where we were. We stay on the stock escalator until another hypothetical point H (the High) passes the doughnut and we step back onto cash escalator. This way we have travelled up the cash escalator.

Superficially I'm noting this is like a Turing machine. Turning machines have States which are like the stock and they travel up and down the data-tape or cash "register" ;-) Whether this similarity is of any use only time will tell.

It seems a game we can't lose on. However there is the problem that we have to pay to change escalator .. in other words we have to take a step down the cash escalator every time we step off or back to the cash escalator. It means that we have to be able to think head just a little bit to ensure that we will recover that initial step.

To ensure that we always move right we need to determine these H/L points and whether they are far enough apart to make shifting escalators worth while. That is all there is between being broke and making a fortune...

But the escalators do not move randomly. There are only so many people allowed on stock escalators and to get on someone must step off. We have to decide who to swap places with. If we think that someone is standing near a L then we are more likely to swap places with them so the escalator gets dragged up so we can cross over. They in turn get to step onto the cash escalator higher than where they were. The opposite happens also dragging the escalator down.

So the actual movement of the escalator is caused by these differences of trade. There is a strong feedback process where the response of players to previous movements is actually causing the current movement. This is most evidential in the fractal patterns in the market.

Fractal systems are iterative systems where a simple input data is fed through a system repeatedly. It means that the basic "motif" or pattern is very simple but by repeating it at different scales a very complex structure of repeating units is created. This is the stock price trace (SPT - my term) the price plotted against time. IN essence it is simple but the simple patterns are repeated in complex structures. I have lost it now but I had a wonderful plot of the gold price I think at 5 day, 3 month and 1 year and the three plots could be virtually over laid. There is certainly no way of telling from an SPT what the duration is... except perhaps the macroeconomic features like inflation and economic growth.

Boxes

To try and characterise SPTs I'm using an idea of Boxes. They are essentially the standard "candles". A box contains the SPT between two dates. How the stock gets from the entry point to the exit point is irrelevant (a black box). We only know its max and min prices (top and bottom of the box) .

The problem then is to replace an SPT with a succession of boxes the only variable between the width of each box. We want each box to not contain too much information about the SPT preferable a straight line between entrance and exit is best, but most importantly a box should start and end at an extreme or turning point. This way each box represents an optimal trading window or period, and that is all we are interested in.

Now because the charts are fractal we have to chose a scale, or trading scale. Apparently short trades are traditionally of period of months to a year and long trades many years. Day traders trade between days and weeks. From experience as a private investor with access to delayed chart data and high costs of entry and exit to the market I've only succeeded a few times in day trading. The advantage is however that through compound interest a small percentage each day compounds to huge gains a year. IgIndex and the like is perhaps a better type of gambling for this scale. Really I'm aiming at the short scale: months.

Anyway that is progress so far and now back to coding... end of Xmas holiday tonight so this may get stuck for a while...

Thursday, 30 December 2010

FTSE Probabilities

The structure below represents the probability of successive up (green) and down (red) moves in the stock market on successive days. [This is worth redoing on 2 day, 3 day trading windows]

The underlying belief is that Up/Down data is what is critical for a trader in a stock. This determines the buy/sell behaviour. The size of the moves on the other hand is only critical for the trader who is choosing a stock. Those stocks with the biggest moves might attract the attention of high-risk investors looking for big gains etc.

The daily FTSE close price since 1977 is linearly skewed so the data set ends on the same price it started. Reason for this is to try and reveal more of the intrinsic up/down data away from the background of economic growth and inflation.

Chains of particular sequences were then counted through the data set. There were 6715 days in the data. This meant that for strings of 4 days (e.g. uddu) of which there are 16 possibilities the total count of all 16 possibilities was 6715. This was true of all sequences. The probability of a particular sequence was easy to calculate as: Occurrence/6715. Dividing each probability by its parent (so that udd is the parent of uddu) gave the probability that the market went up at that point.

The obvious point is to see if there are daily trends in the stock-market that drive patterns of movement. While not tested yet these data are very likely to be significant so that the distortions to the tree below represent actual features of the FTSE.

Because this is FTSE data no single group of traders is responding to the FTSE moves. This is not speculative strategy, but rather patterns in the whole market together. The tree ought to be more regular than it is!
Red means a move down in the price, Green is a move up. The higher the probability the longer the bar and the heavier so it tilts in that direction. For example, the first branch between a stock going up and down from a random entry point is biased in the up direction, as is the second move.

Tuesday, 28 December 2010

"Services" that rip me off

Interesting page here with old tickets on it:

From this we can see the cost of a single from London to (with year, average salary, relative salary index):
Av.Salary Relative salary
Bath £6.65 1975 114.5
Feltham £0.52 1979 6K 126.7
2010 23K


There is incomplete data on salary, but very roughly approximating exponentially gives a value of 5k for 1975 against the relative salary data which suggests a true figure of 5.4 ; I'll take 5.2. So the expected value of these tickets is £28 for the trip to Bath and £2 for the trip to Feltham.

Surprisingly the price today to Bath (for the cheapest ticket) is £28. If you fail to get these the next is £34 but to travel at peak time costs £77. In contrast the trip to Feltham costs £5.

This is my experience also. What the travel operators have done is not logical on the principle that we pay for what we buy. Instead the charging plan is designed to maximise the cost to the customer. I have been equally displeased with mobile phone pricing and as a result refuse to get involved with mobile phone companies any more. I am ASDA (Vodaphone) pay as you go - this ensures some of the logic that I get what I pay for.

Thus, for short journeys that cost only a few pounds, the new costs seem to be only a few pounds more and so bearable. Expensive journeys have carefully kept down so that they don't spark too much anger since 100% on a £100 ticket is very noticeable when you start spending £100 in one go more!

Yet most journeys are short journeys, I assume, so the average increase experienced across the the population is very high, and the profits gained by the operating companies huge.

Now what I don't understand, and which I have argued with customer services on many occasions, is why I should pay for "services" from a company that is clearly trying to rip me off? Where is the "service" is that? Where above all is the trust!

So sadly companies are stuck between a devil and the deep blue sea. They have fickle investors demanding big profit reports and dividends, and they (hopefully) have customers refusing to be ripped off. Sadly in the age of private/public monopolies most customers don't have the choice but to be ripped off, probably the biggest oversight of all by the governments.

I should add of course that the public services were subsidised by the government from the tax payer so we did indirectly pay more for our rail services than today. Government spending on transport in billions is as follows:
Spending GDP AV. Salary Av Salary as millionth%
of GDP
1975 3.8billion 106.7 3.56%
1979 4.5 199.2 2.30% 6k 3% (millionths)
2010 21.5 1474 1.46% 23k 1.56% (millionths)


What doesn't tally however is that salaries have not kept pace with economic growth. We take home on average half of what we did in 1975 compared with the total countries productivity. One explanation is that the extra money lies in the hands of just a few thus biasing the average figure. This makes the data using GDP difficult the compare.

Let us take the government spending per head (assume 60million) and compare it with ticket prices, and salary:

1975 £68/person/year 10 trips to bath 1.3%
1979 £75 144 trips to Feltham 1.25%
2010 £358 12.8 bath / 71.6 Feltham 1.6%

SO extraordinary result that actually we are spending more on transport now than we were! So the rail operators can't complain about changes in funding... although I do suspect that the money we do spend goes on cars.

US displaying its Imperialist credentials... yet again

Wanted to know the pattern of UN votes over Venezuela and then got into seeing if ChatGPT could see the obvious pattern of Imperialism here....