Numerical methods and optimization in finance manfred gilli - Quickly download the ebook to read any
Numerical Methods and Optimization in Finance Manfred
Gilli
Visit to download the full and correct content document: https://textbookfull.com/product/numerical-methods-and-optimization-in-finance-manfr ed-gilli/
More products digital (pdf, epub, mobi) instant download maybe you interests ...
Recent Advances in Computational Optimization: Results of the Workshop on “Computational Optimization” and “Numerical Search and Optimization” 2018 Stefka Fidanova
Fig.2.1 Function f(x) = cos(x x ) sin(e x ) (leftpanel)andrelativeerrorofthenumericalapproximationof thederivativeat x = 1 5forforwarddifference(thickline)andcentraldifference(thinline). 24
Fig.4.13 Coordinatetransformationsfor N = 29and X = 20.Leftpanel:Hyperbolicsinefunctionwith λ = 10and p = 0 4.Rightpanel:Logarithmictransformationwith I = 2. 78
Fig.6.9 ScatterplotsforfirstuniformPRNsdrawnfromseeds s and s + 1.
Fig.6.10
Fig.6.11
FirstnormalPRN(polar)drawnforseeds s = 1,..., 10,000.
FirstnormalPRN(ziggurat)drawnforseeds s = 1,..., 600,000.
Fig.6.12 Scatterplotfirstdrawsfromthreesubsequentseeds s = 1,..., 5000.
Fig.6.13 FirstPRNdrawnforseeds s = 1,..., 1000, x1,s plottedagainst x1,s +d with d = 100,1000and 10,000(lefttoright)forthepolar(toppanel)andziggurat(bottompanel)RNGs.
Fig.6.14
101stPRNdrawnforseeds s = 1,..., 1000, x101,s fortheuniform(toppanel)andnormal(bottom panel)RNGs.
ActualFTSEdailylogreturnsforJuly2004toJune2010(left)andtwosimulationsbasedona GARCHmodelfittedonactualdata(centerandright;2525observationseach;seedsfixedwith randn(’seed’,10) and randn(’seed’,50),respectively).
Fig.8.13 Momentsofabuy-and-holdportfolio(thickgraylines)anditsconstituents(thinblacklines;FTSE, DAX,andEuroStoxx)overdifferentlengthsofinvestmenthorizons(x -axis: T =1,5,21,62days; correspondingto1day,1week,1month,1quarter);basedonoriginaldataAugust2005toJuly 2010and1,000,000bootstraps.Toppanel,blocklength b = 1;centerpanel,blocklength b = 5;and bottompanel,blocklength b = T
Fig.9.1 CPPIcompositionfortwosamplepriceprocessesanddifferentmultiplierstimetomaturityof2 yearsanddailyreadjustment(“nogaprisk”)andquarterlyreadjustment(rightmost;“withgaprisk”). Lightgray:safeasset, Bt ;darkgray:exposure, Et ;whiteline:floor, Ft .
Fig.9.8 ForwarddifferenceforGreeks:BoxplotsforDeltaestimateswith M = 1and N = 100,000for differentvaluesof h (y -axis).Parametersare S = 100, X = 100, τ = 1, r = 0.03, q = 0,and σ = 0.2.
Fig.11.6 BehavioroftheNewtonmethodfordifferentstartingvalues.Upperleft: x 0 = 2 750and x sol = 2 4712.Upperright: x 0 = 0 805and x sol = 2 4712.Lowerleft: x 0 = 0 863and x sol = 1.4512.Lowerright: x 0 = 1.915andalgorithmdiverges.
Fig.16.6 Nelson–Siegel–Svensson:Thethreepanelsshowthecorrelationbetweenthesecondandthethird, thesecondandthefourth,andthethirdandthefourthregressorsinEqs.(16.10)fordifferent λ-values(the x -and y -axesshow λ1 and λ2 between0and25).
Fig.17.8 AbsoluteerrorsforGauss–LegendreandGauss–Laguerrecomparedwith normcdf foran increasingnumberofnodes.Errorsareplottedonthe y axis;the x axisshowsthenumberofnodes. 595
Ofcourse,manytechnologiesthatarebrandedFinTech,TechFin,RoboAdvice,orwhatevertoday,arejusthype.Butsuchtechnologiesdoofferthegenuinepossibilityforbetterfinance,with lowercosts,fewermiddlemen,andmoreefficiency.Here,thesimulationandoptimizationtechniqueswediscussinParts II and III ofthebookgainevenmorerelevance.Letusprovideaspecific example:financialportfoliosareoftenrepresentedasweightsinsteadofactual(integer)positions, becausethatmakesthemmoretractableforclassicaloptimizationtechniques.Thisisoftendeclared harmlessbecauseforinstitutionalinvestors,whorunlargeportfolios,thedifferencesbetweenusing decimalnumbersandintegerswillbesmall.1 Butthatdoesnotholdforaninvestorwhoseportfolioisofonlymoderatesizeof20,000dollars,say(Maringer, 2005b,Chapters3and4).Butsuch investorsareexactlythosethatshouldbenefitfromthenewfinancialtechnologies.
Sinceweareattechnology,whatelsehaschanged?Computershavebecomeevenfaster,and evenmoredataarestored,oftendirectlyattechnologyfirmslargeandsmall(thesecompanies alsodomuchmoreresearch).Andartificialintelligenceandmachinelearningareseeinganother spring.Hereagain,Parts II and III aredirectlyapplicable,inparticulartheoptimizationtechniques wediscuss:afterall,machinelearningisinessencesettingupamodelandsolvingit(Goodfellow etal., 2016,Chapter5).
1.WeshouldstressthatsuchaclaimcouldonlybeempiricallyverifiedbyusingsuchmethodsaswedescribeinPart III of thebook.
• Materialonparallelcomputingwithboth MATLAB® and R hasbeenadded.
• Materialonsolvinglinearsystemswith R hasbeenadded.
• Manyoftheexisting R exampleshavebeenrewrittenwith Sweave (Leisch, 2002),makingthem completelyreproducible.Thenewchaptersarewrittenwith Sweave too.
AboutRcode
Most R functionsthatweredescribedinthefirsteditionareincludedinthe NMOF package,which hasgrownquiteabitovertheyears.Nevertheless,all R codeexamplesfromthefirsteditionstill workwiththecurrentversionof R andthepackage(thoughseveralexampleshavebeenimproved inthisedition).
Mostoftheold R codeandallnewly-added R codehasnowbeenpreparedwith Sweave;so codeforgraphics,tables,etc.isdirectlyembeddedinthesourcedocument.Thatdoesnotmean thatallcodeisalwaysshowninthebook:itwouldbetiresomehavingtoreadthesamecode forplottingaresult,say,overandoveragain.However,thecompletecodeistangledandcanbe accessedonthebook’swebsite http://www.nmof.info.Itisalsocontainedinthepackage(seethe function showExample).Forthosepartsthatuse Sweave,allcodeforasinglechapteriscollected inone R sourcefile.Tomakeiteasiertonavigatethesefiles,manycodechunkshavenames,which areprintedinthemargin,asinthefollowingsnippet.
“Ithinkthereisaworldmarketformaybefivecomputers.”Sosaid,allegedly,ThomasJ.Watson, thenchairmanof IBM ,in1943.Itwouldtakeanothertenyears,until1953,before IBM delivered itsfirstcommercialelectroniccomputer,the701.
Butinanycase,Watson’sallegedstatementreflectsthespiritofthetime,andreadingittoday plainlyshowstheextenttowhichcomputingpowerhasbecomeavailable:nowadaysineveryone’s pocket,therearedevicesthatperformmillionsoftimesfasterthan IBM ’s701.
1.Thisappliesaswelltopredictionsabouttechnologyandtopredictionsingeneral.See,forinstance,predictionson TV at http://www.elon.edu/e-web/predictions/150/1930.xhtml
Interpretedlanguages. Inthepast,implementingalgorithmsoftenmeantcreatingprototypesina higher-levellanguageandthenrewritingsuchprototypesinlow-levellanguagessuchas C. Today,prototypeswritteninlanguagessuchas MATLAB® , R, Python, Julia or Lua areso fastthatareimplementationisrarelyneeded.Asaconsequence,implementationtimeshave decreased,andwecanmuchfasterexplorenewideasandadaptexistingprograms.
3.Thefirst IBM personalcomputerintheearly1980sdidabout10or20kFLOPS(oneFLOPisonefloatingpointoperation persecond,seepage 29).Andthespeedupdoesnottakeintoaccountimprovementsinalgorithms.
Another random document with no related content on Scribd:
saw a multitude of Tomts come, each bearing a stalk of rye, among them one not larger than a man’s thumb, bearing a straw upon his shoulders.
“Why do you puff so hard?” said the farmer from his hiding-place, “your burden is not so great.”
“His burden is according to his strength, for he is but one night old,” answered one of the Tomts, “but hereafter you shall have less.”
From that day all luck disappeared from the farmer’s house, and finally he was reduced to beggary.
In many districts it has been the custom to set out a bowl of mush for the fairies on Christmas eve.
In the parish of Nyhil there are two estates lying near each other, and both called Tobo. On one was a Tomt, who, on Christmas eve, was usually entertained with wheaten mush and honey. One time the mush was so warm when it was set out that the honey melted. When the Tomt came to the place and failed to find his honey as heretofore, he became so angry that he went to the stable and choked one of the cows to death. After having done this he returned and ate the mush, and, upon emptying the dish, found the honey in the bottom. Repenting his deed of a few minutes before, he carried the dead cow to a neighboring farm and led therefrom a similar cow with which to replace the one he had killed. During his absence the women had been to the barn and returned to the house, where the loss was reported to the men, but when the latter arrived at the cowshed the missing [125]cow had apparently returned. The next day they heard of the dead cow on the adjoining farm, and understood that the Tomts had been at work.
In one place, in the municipality of Ydre, a housewife remarked that however much she took of meal from the bins there seemed to be no diminution of the store, but rather an augmentation. One day when she went to the larder she espied, through the chinks of the door, a little man sifting meal with all his might.
Noticing that his clothes were very much worn, she thought to reward him for his labor and the good he had brought her, and made him a new suit, which she hung upon the meal bin, hiding herself to see what he would think of his new clothes. When the Tomt came again he noticed the new garments, and at once exchanged his tattered ones for the better, but when he began to sift and found that the meal made his fine clothes dusty he threw the sieve into the corner and said:
“Junker
Grand is dusting himself. He shall sift no more.” [126]
The belief in Tomts has been handed down to us through many generations, and is widespread in Sweden In the opinion [123]of the writer they are nothing more or less than an inheritance from the classical past and a remnant of the domestic worship which the ancients bestowed upon their family gods Legends similar to this are related in Norway, where the spirit is called Topvette or Tomlevette and Gardos; also in Faroe Islands, where they are called Niagriusar, and in Germany, where they are called Kobolde, etc. ↑
[Contents]
T
C N .1
On the estate of Norrhult, in the parish of Rumskulla, the people in olden times were very much troubled by Trolls and ghosts. The disturbances finally became so unbearable that they were compelled to desert house and home, and seek an asylum with their neighbors. One old man was left behind, and he, because he was so feeble that he could not move with the rest.
Some time thereafter, there came one evening a man having with him a bear, and asked for lodgings for himself and companion. The old man consented, but expressed doubts about his guest being able to endure the disturbances that were likely to occur during the night.
The stranger replied that he was not afraid of noises, and laid himself down, with his bear, near the old man’s bed.
Only a few hours had passed, when a multitude of Trolls came into the hut and began their usual clatter. Some of them built the fire in the fireplace, others set the kettle upon the fire, and others again put into the kettle a mess of filth, such as lizards, frogs, worms, etc.
When the mess was cooked, the table was laid and the Trolls sat down to the repast. One of them threw a worm to the bear, and said:
“Will you have a fish, Kitty?” [127]
Another went to the bear keeper and asked him if he would not have some of their food. At this the latter let loose the bear, which struck about him so lustily that soon the whole swarm was flying through the door.
Some time after, the door was again opened, and a Troll with mouth so large that it filled the whole opening peeked in. “Sic him!” said the bear keeper, and the bear soon hunted him away also.
In the morning the stranger gathered the people of the village around him and directed them to raise a cross upon the estate, and to engrave a prayer on Cross Mountain, where the Trolls dwelt, and they would be freed from their troublesome visitors.
Seven years later a resident of Norrhult went to Norrköping. On his way home he met a man who asked him where he came from, and, upon being informed, claimed to be a neighbor, and invited the peasant to ride with him on his black horse. Away they went at a lively trot along the road, the peasant supposed, but in fact high up in the air. When it became quite dark the horse stumbled so that the peasant came near falling off.
“It is well you were able to hold on,” said the horseman. “That was the point of the steeple of Linköping’s cathedral that the horse stumbled against. Listen!” continued he. “Seven years ago I visited Norrhult. You then had a vicious cat there; is it still alive?”
“Yes, truly, and many more,” said the peasant.
After a time the rider checked his horse and bade [128]the peasant dismount. When the latter looked around him he found himself at Cross Mountain, near his home.
Some time later another Troll came to the peasant’s cottage and asked if that great savage cat still lived.
“Look out!” said the peasant, “she is lying there on the oven, and has seven young ones, all worse than she.”
“Oh!” cried the Troll, and rushed for the door. From that time no Trolls have ever visited Norrhult. [129]
1
Not longer than thirty years ago a cross, said to be the one raised on this occasion, was still standing in Norrhult ↑
[Contents]
L B B .1
On the estate of Brokind, in the parish of Vardsnäs, dwelt, in days gone by, a rich and distinguished [130]lady named Barbro, who was so hard-hearted and severe with her dependents that for the least transgression they were bound, their hands behind their backs, and cast into prison, where, to add to their misery, she caused a table, upon which a bountiful supply of food and drink was placed, to be spread before them, which, of course, bound as they were, they could not reach. Upon complaint being made to her that the prisoners were perishing from hunger and thirst, she would reply, laughingly: “They have both food and drink; if they will not partake of it the fault is theirs, not mine.”
Thus the prison at Brokind was known far and wide, and the spot where it stood is to this day called Kisthagen, in memory of it.
When Lady Barbro finally died she was buried in the grave with her forefathers, in the cathedral of Linköping, but this was followed by such ghostly disturbances that it became necessary to take her body up, when it was interred in the churchyard of Vardsnäs.
Neither was she at rest here, whereupon, at the suggestion of one of the wiser men of the community, her body was again taken up, and, drawn by a yoke of twin oxen, was conveyed to a swamp, where it was deposited and a pole thrust through both coffin and corpse. Ever after, at nightfall, an unearthly noise was heard in the swamp, and the cry of “Barbro, pole! Barbro, pole!”
The spirit was, for the time being, quieted, but, as with ghosts in all old places, it returned after a time, and often a light is seen in the large, uninhabited building at Brokind. [131]
1 This story was found, after his death, among the papers of the lecturer, J. Vallman The estate of Brokind, before it came into the possession of the family of Count Falkenberg, was owned, for about two centuries, by the family of Night and Day. It is probable that the Lady Barbro wrought into this legend is Lady Barbro, Erik’s daughter, wife of Senator Mons, Johnson Night and Day, though how she was made to play a part in the narrative is not known, as her body was not impaled in a swamp, but rests peacefully in an elegant grave in the cathedral of Linköping ↑
[Contents]
T U N W .1
From the point where the river Bulsjö empties into Lake Sommen, extending in a northerly direction for about eight miles, bordering the parishes of North Wij and Asby, nearly up to a point called Hornäs, stretches the principal fjord, one of several branching off from the large lake.
Near Vishult, in the first named of these parishes, descending to the lake from the elevation that follows its west shores, is a wall-like precipice, Urberg, which, from the lake, presents an especially magnificent view, as well in its height and length, and in its woodcrowned top, as in the wild confusion of rocks at its base, where, among the jumble of piled-up slabs of stones, gape large openings, into which only the imagination dares to intrude.
From this point the mountain range extends southward toward Tulleram, and northward, along the shore of Lake Sjöhult, under the name of Tjorgaberg, until it ends in an agglomeration of rocks called Knut’s Den.
In this mountain dwells the Urko, a monster cow of traditionary massiveness, which, in former times, when she was yet loose, plowed the earth, making what is now Lake Sommen and its many fjords. At last [132]she was captured and fettered by a Troll man from Tulleram, who squeezed a horseshoe around the furious animal’s neck and confined her in Urberg. For food she has before her a large cow-hide from which she may eat a hair each Christmas eve, but when all the hairs are consumed, she will be liberated and the destruction of Ydre and all the world is to follow.
But even before this she will be liberated from her prison if Ydre is crossed by a king whom she follows and kills if she can catch him before he has crossed to the confines of the territory.
It happened one time that a king named Frode, or Fluga, passed through Ydre, and, conscious of the danger, hurried to reach the boundaries, but, believing he had already passed them, he halted on the confines at Fruhammer, or, as the place was formerly called, Flude, or Flugehammer, where he was overtaken and gored to death by the monster. In confirmation of this incident, his grave, marked by four stones, is to this day pointed out.
Another narrative, which, however, is known only in the southeastern part of the territory, relates that another king, unconscious of the danger accompanying travel in the neighborhood, passed unharmed over the border, and had reached the estate of Kalleberg, when he heard behind him the dreadful bellowing of the monster in full chase after him. The king hastened away as speedily as possible. The cow monster, unable to check its mad gallop at the border, rushed over some distance to the place where the king first paused, where, in the gravel-mixed field, she pawed up a round [133]hole of several hundred feet in breadth, which became a bog, whose border, especially upon the north side, is surrounded by a broad wall of the upheaved earth.
Still, at times, especially preceding a storm, the Urko is heard rattling its fetters in the mountain, and both upon the mountain and down near the shore of the lake by times.
Extraordinary things are said to happen. One and another of the residents thereabouts assert even that they have seen the Urko in her magnificent rooms and halls, which the neighbors do not for a moment doubt. [134]
1 This legend doubtless grew out of the story of the flood, in this form relating how the mighty waters burst their bounds and were in time again imprisoned in their beds ↑
[Contents]
T T S .
Near Kölefors, in the jurisdiction of Kinda, lived, a long time ago, an old woman, who, as the saying goes, was accustomed, during Easter week, to go to Blåkulla.
Late one Passion Wednesday evening, as was usual with witches, she lashed her pack in readiness for the night, to follow her comrades in their wanderings. In order that the start should be accompanied by as few [135]hindrances as possible, she had greased her shoes and stood them by the fireplace to dry.
In the dusk of the evening there came to her hut another old woman, tired and wet through from the rain, and asked permission to remain over night. To this the witch would not consent, but agreed to allow the woman to remain until she had dried her soggy shoes before the fire, while she, unwilling to be under the same roof with her guest, remained outside.
After a time the fire died out, and it became so dark in the hut that when the stranger undertook to find her shoes, in order to continue her journey, she got and put on the witch’s shoes instead. Hardly had she passed out through the door when the shoes jerked her legs up into the air and stood her head downward, without, however, lifting her into the air and carrying her away as would have been if the witch’s broom had been in her hand.
In this condition the old woman and the shoes struggled through the night. Now the shoes stood her on her head and dragged her along the ground, now the woman succeeded in grasping a bush or root, and was able to regain her feet again for a time.
In the end, near morning, a man walking past, noticed her and hastened to her relief. Answering her earnest pleading the man poked off one of the shoes with a stick, whereupon, instantly, shoe and stick flew into the air and vanished in the twinkling of an eye. After the adventures of the night the old Troll woman was so weakened that she fell into a hole, which is pointed out to this day, and is called “The Troll Woman’s Pit.” [136]
[Contents]
T W S N .1
Both wood nymphs and sea nymphs belong to the giant family, and thus are related.
They often hold communication with each other, although the wood nymphs always hold themselves a little above their cousins, which frequently occasions differences between them.
A peasant, lying in the woods on the shores of Lake Ömmeln, heard early one morning voices at the lake side engaged in vehement conversation. Conjecturing that it was the wood nymphs and sea nymphs quarreling, he crept through the underbrush to a spot near where they sat, and listened to the following dialogue:
Sea Nymph—“You shall not say that you are better than I, for I have five golden halls and fifty silver cans in each hall.”
Wood Nymph—“I have a mountain which is three miles long and six thousand feet high, and under that mountain is another, ten times higher and formed entirely of bones of the people I have killed.”
When the peasant heard this he became so alarmed [137]that he ran a league away, without stopping. Thus he did not learn which was victorious, but it was the wood nymphs without doubt, as they have always been a little superior to the others. [138]
The wood nymph dwells in large forests, and is described as a beautiful young woman, when seen face to face; but if her back be turned to one it is hollow, like a dough-trough, or resembles a block stub Sometimes, instead of a hollow back, she is adorned with a bushy fox tail The sea nymph dwells, as indicated by the name, at the bottom of seas and lakes, and is clad in a skirt so snow-white that it sparkles in the sunlight. Over the skirt she wears a light blue jacket. Usually her