Introduction to Python for Econometrics, Statistics and Data Analysis Kevin Sheppard All Chapters Instant Download
Introduction to Python for Econometrics, Statistics and Data Analysis Kevin Sheppard All Chapters Instant Download
https://ebookmass.com
https://ebookmass.com/product/introduction-to-
python-for-econometrics-statistics-and-data-
analysis-kevin-sheppard/
https://ebookmass.com/product/introduction-to-python-for-econometrics-
statistics-and-data-analysis-5th-edition-kevin-sheppard/
testbankdeal.com
https://ebookmass.com/product/introduction-to-statistics-and-data-
analysis-6th-edition-roxy-peck/
testbankdeal.com
https://ebookmass.com/product/statistics-and-data-analysis-for-
nursing-research-2nd-edition-2nd-edition/
testbankdeal.com
https://ebookmass.com/product/introduction-to-research-methods-and-
data-analysis-in-psychology-darren-langdridge/
testbankdeal.com
Introduction to Econometrics 3rd Edition James H. Stock
https://ebookmass.com/product/introduction-to-econometrics-3rd-
edition-james-h-stock/
testbankdeal.com
https://ebookmass.com/product/introduction-to-econometrics-global-
edition-james-h-stock/
testbankdeal.com
https://ebookmass.com/product/introduction-to-linear-regression-
analysis-wiley-series-in-probability-and-statistics-6th-edition-
montgomery/
testbankdeal.com
https://ebookmass.com/product/an-introduction-to-statistical-methods-
and-data-analysis-7th-edition-ebook-pdf/
testbankdeal.com
https://ebookmass.com/product/enzymes-a-practical-introduction-to-
structure-mechanism-and-data-analysis-3rd-edition-robert-a-copeland/
testbankdeal.com
Introduction to Python for
Econometrics, Statistics and Data Analysis
3rd Edition, 1st Revision
Kevin Sheppard
University of Oxford
• Verified that all code and examples work correctly against 2019 versions of modules. The notable
packages and their versions are:
• Python 2.7 support has been officially dropped, although most examples continue to work with 2.7.
Do not Python 2.7 in 2019 for numerical code.
• Fixed direct download of FRED data due to API changes, thanks to Jesper Termansen.
• Thanks for Bill Tubbs for a detailed read and multiple typo reports.
• Tested all code on Pyton 3.6. Code has been tested against the current set of modules installed by
conda as of February 2018. The notable packages and their versions are:
– NumPy: 1.13
– Pandas: 0.22
ii
Notes to the 3rd Edition
This edition includes the following changes from the second edition (August 2014):
• Python 3.5 is the default version of Python instead of 2.7. Python 3.5 (or newer) is well supported by
the Python packages required to analyze data and perform statistical analysis, and bring some new
useful features, such as a new operator for matrix multiplication (@).
• Removed distinction between integers and longs in built-in data types chapter. This distinction is
only relevant for Python 2.7.
• dot has been removed from most examples and replaced with @ to produce more readable code.
• Split Cython and Numba into separate chapters to highlight the improved capabilities of Numba.
• Verified all code working on current versions of core libraries using Python 3.5.
• pandas
• New chapter introducing statsmodels, a package that facilitates statistical analysis of data. statsmod-
els includes regression analysis, Generalized Linear Models (GLM) and time-series analysis using
ARIMA models.
iv
Changes since the Second Edition
• Added diagnostic tools and a simple method to use external code in the Cython section.
• Added examples of joblib and IPython’s cluster to the chapter on running code in parallel.
• New chapter introducing object-oriented programming as a method to provide structure and orga-
nization to related code.
• Added seaborn to the recommended package list, and have included it be default in the graphics
chapter.
• Based on experience teaching Python to economics students, the recommended installation has
been simplified by removing the suggestion to use virtual environment. The discussion of virtual
environments as been moved to the appendix.
• Changed the Anaconda install to use both create and install, which shows how to install additional
packages.
This edition includes the following changes from the first edition (March 2012):
• The preferred installation method is now Continuum Analytics’ Anaconda. Anaconda is a complete
scientific stack and is available for all major platforms.
• New chapter on pandas. pandas provides a simple but powerful tool to manage data and perform
preliminary analysis. It also greatly simplifies importing and exporting data.
• Numba provides just-in-time compilation for numeric Python code which often produces large per-
formance gains when pure NumPy solutions are not available (e.g. looping code).
• Numerous typos
1 Introduction 1
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Important Components of the Python Scientific Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Using Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.A Additional Installation Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5 Basic Math 57
5.1 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.2 Broadcasting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.3 Addition (+) and Subtraction (-) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.4 Multiplication (*) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.5 Matrix Multiplication (@) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.6 Array and Matrix Division (/) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.7 Exponentiation (**) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.8 Parentheses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.9 Transpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.10 Operator Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.11 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
7 Special Arrays 77
7.1 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
15 Graphics 141
15.1 seaborn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
15.2 2D Plotting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
15.3 Advanced 2D Plotting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
15.4 3D Plotting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
15.5 General Plotting Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
15.6 Exporting Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
15.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
xii CONTENTS
16 pandas 161
16.1 Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
16.2 Statistical Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
16.3 Time-series Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
16.4 Importing and Exporting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
16.5 Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
16.6 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
30 Examples 349
30.1 Estimating the Parameters of a GARCH Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
30.2 Estimating the Risk Premia using Fama-MacBeth Regressions . . . . . . . . . . . . . . . . . . . . . . . . . 354
30.3 Estimating the Risk Premia using GMM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
30.4 Outputting LATEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Introduction
1.1 Background
These notes are designed for someone new to statistical computing wishing to develop a set of skills nec-
essary to perform original research using Python. They should also be useful for students, researchers or
practitioners who require a versatile platform for econometrics, statistics or general numerical analysis
(e.g. numeric solutions to economic models or model simulation).
Python is a popular general–purpose programming language that is well suited to a wide range of prob-
lems.1 Recent developments have extended Python’s range of applicability to econometrics, statistics, and
general numerical analysis. Python – with the right set of add-ons – is comparable to domain-specific
languages such as R, MATLAB or Julia. If you are wondering whether you should bother with Python (or
another language), an incomplete list of considerations includes:
You might want to consider R if:
• You want to apply statistical methods. The statistics library of R is second to none, and R is clearly
at the forefront of new statistical algorithm development – meaning you are most likely to find that
new(ish) procedure in R.
• Free is important.
• Documentation and organization of modules are more important than the breadth of algorithms
available.
• Performance is an important concern. MATLAB has optimizations, such as Just-in-Time (JIT) com-
pilation of loops, which is not automatically available in most other packages.
• You don’t mind learning enough Python to interface with Python packages. The Julia ecosystem is
in its infancy and a bridge to Python is used to provide important missing features.
• You like living on the bleeding edge and aren’t worried about code breaking across new versions of
Julia.
Having read the reasons to choose another package, you may wonder why you should consider Python.
• You need a language which can act as an end-to-end solution that allows access to web-based ser-
vices, database servers, data management and processing and statistical computation. Python can
even be used to write server-side apps such as a dynamic website (see e.g. http://stackoverflow.
com), apps for desktop-class operating systems with graphical user interfaces, or apps for tablets and
phones apps (iOS and Android).
• Data handling and manipulation – especially cleaning and reformatting – is an important concern.
Python is substantially more capable at data set construction than either R or MATLAB.
• Free is an important consideration – Python can be freely deployed, even to 100s of servers in on a
cloud-based cluster (e.g. Amazon Web Services, Google Compute or Azure).
1.2 Conventions
2
Python performance can be made arbitrarily close to C using a variety of methods, including Numba (pure python), Cython
(C/Python creole language) or directly calling C code. Moreover, recent advances have substantially closed the gap with respect
to other Just-in-Time compiled languages such as MATLAB.
Random documents with unrelated
content Scribd suggests to you:
angered, fierce, terrible, has rallied the cream of his armies around him. The
sixth assault has just been repulsed, the breach cleared by a terrific fusillade
from that handful of men, whilst a murderous shower from above, of
granite and scrap-iron and heavy stones, has scattered the attacking party. A
fragment of stone has hit the Duke on the forehead; blood is streaming
down his face. He sets spurs to his horse and gallops to where a company of
archers is scrambling helter-skelter out of the moat.
He strikes at the soldiers with his sword, sets spurs to his horse until the
poor beast snorts with pain, rears and paws the air with its hoofs, only to
bring them down the next moment, trampling and kicking half a dozen
soldiers to death in its mad and terrified struggle.
'You know the guard has fled,' Alexander Farnese cries to his officers.
''Tis only an undisciplined mob who is in there now.'
'A mob led by a man who has the whole art of warfare at his finger-tips.
Look at him now!'
All eyes are turned in the direction to which Don Miguel is pointing.
There, in the midst of smouldering ruins of charred débris and crumbling
masonry, stands the defender of Cambray; behind him the graceful steeples
of St. Géry and of St. Waast, the towers of Notre Dame and of the Town
Hall, are lit up by the honey-coloured rays of the sinking sun. Superb in his
tattered clothes, with chest and arms bare, and ragged hose, he stands
immovable, scanning the western sky.
'He is still on the look-out for that promised help from France,' he says,
with a shrug of his shoulder.
The traitor has made good his escape out of the city which he has
betrayed. What assistance he could render to the Duke in the way of
information, he has done. The measure of his infamy is full to the brim, and
yet his hatred for the enemy who has shamed him is in no way assuaged.
He, too, looks up and sees Gilles de Crohin, the man whose invincible
courage has caused the Spanish armies so many valuable lives this day and
such unforgettable humiliation.
'A hundred doubloons,' he cries aloud, 'to the first man who lays that
scoundrel low!'
The word is passed from mouth to mouth. The archers and musketeers
set up a cheer. Parma adds, with an oath: 'And a captain's rank to boot!'
An hundred doubloons and a captain's rank! 'Tis a fortune for any man.
It means retirement, a cottage in sunny Spain, a home, a wife. The men take
heart and look to their arrows and their muskets! Every archer feels that he
has that fortune in his quiver now and every musketeer has it in his powder
horn. And with a loud cry of 'Long live King Philip of Spain!' the infantry
once more rush for the breach.
IV
Don Miguel de Salvado leads the attack this time. The breach now looks
like a gate which leads straight into the heart of the city, where pillage and
looting are to be the reward of the conquerors; and the booty will be rich
with the precious belongings of a pack of overfed bourgeois.
That open gate for the moment seems undefended. It is encumbered with
fallen masonry, and beyond this appear piles of rubbish, overturned wagons,
furniture, débris of all sorts, evidently abandoned by the wretched
inhabitants when they fled from their homes. Of Gilles de Crohin and his
burghers there is for the moment no sign.
Don Miguel has with him half a company of musketeers, the finest
known in Europe, and a company of lancers who have been known to clear
an entire city of rebels by their irresistible onrush.
'No falling back, remember!' he commands. 'The first who gives ground
is a dead man!'
Up the lancers run on the slippery ground, clinging to the wet earth with
naked feet, to the coarse grass and loose stones with their knees. The
musketeers remain on the hither side of the moat, three deep in a long battle
array; the front lying flat upon the ground, the second kneeling, the third
standing, with their muskets levelled against the first enemy who dares to
show his face. The pikemen have reached the breach. There is silence on
the other side. The officer laughs lustily.
The words are hardly out of his mouth when a terrific volley of musketry
shakes the fast crumbling wall to its foundation. It comes from somewhere
behind all those débris—and not only from there, but from some other
unknown point, with death-like precision and cold deliberation. The
Spanish officer is hit in the face; twelve pikemen throw up their arms and
come rolling down on the wet ground.
'What is this hell let loose?' cries the officer savagely, ere he too, blinded
with the flow of blood down his face, beats a hasty retreat.
'Return to the charge!' is the Duke of Parma's curt command, and sends
one of his ablest officers to lead a fresh charge. He himself organizes a
diversion, crosses the small rivulet, which flows into the Schelde at the foot
of Cantimpré, and trains his artillery upon a vulnerable piece of wall,
between the bastion and the river bank. He has the finest culverines known
in Europe at this time, made on a new pattern lately invented in England;
his cannon balls are the most powerful ever used in warfare, and some of
his musketeers know how to discharge ten shots in a quarter of an hour—an
accomplishment never excelled even by the French.
So, while one of his ablest officers is in charge of the attacking party on
the breach, His Highness himself directs a new set of operations. Once
more the roar of artillery and of musketry rend the air with their portentous
sound. The Duke of Parma's picked men attack the last bastion of
Cantimpré, whilst from the roads of Arras, of Sailly and Bapaume, the
whole of the Spanish infantry rush like a mighty wave to the charge.
Pikemen and halberdiers, archers and lancers, once more to the assault!
Are ye indeed cowards, that a pack of Flemish rabble can hold you at bay
till you sink back exhausted and beaten? Up, Bracamonte and Ribeiras!
Messar, with your musketeers! Salvado, with your bow-men! Up, ye mighty
Spanish armies, who have seen the world at your feet! With Farnese himself
to lead you, the hero of an hundred sieges, the queller of an hundred
rebellions; are ye dolts and fools that you cannot crush a handful of
undisciplined rabble?
And Gilles de Crohin in their midst, invincible and cool, scours the
battlements and the breach, the bastions and the ramparts—always there
where he is needed most, where spirits want reviving or courage needs the
impetus of praise. He knows as well as they do that gunpowder is running
short, that arrows are few and thousands of weapons broken with usage: he
knows, better than they do, that if de Balagny's troop tarries much longer all
this heroic resistance will have been in vain.
Now the Spanish halbertmen have reached the hither side of the moat.
The breach is before them, tantalizingly open. The lancers are following
over the improvised bridges, and behind them the musketeers are sending a
volley of shot over their heads into the breach. It is all done with much
noise and clash of steel and thundering artillery and cries of 'Long live King
Philip!'—all to cover the disposing of scaling ladders against the walls.
The pikemen are executing this surprise attack, one in which they are
adepts. The noisy onslaught, the roar of artillery, the throwing of dust in the
eyes of wearied defenders; then the silent scaling of the walls, the rush upon
the battlements, wholesale panic and slaughter.
Alexander Farnese hath oft employed these devices and hath never
known them to fail. So the men throw down their pikes, carry pistols in
their right hand and a short dagger-like sword between their teeth. They fix
their ladders—five of them—and begin quite noiselessly to mount. Ten on
each ladder, which makes fifty all told, and they the flower of the Duke of
Parma's troops. Up they swarm like human ants striving to reach a hillock.
Now the gunners have to cease firing, lest they hit those ladders with their
human freight.
And while at the breach the men of Cambray make their last desperate
stand, the first of the Spanish pikemen has reached the topmost rung of his
ladder. The human ants have come to the top of their hillock. Already the
foremost amongst them has begun to hoist himself up, with his hands
clinging to the uneven masonry. The next second or two would have seen
him with his leg over the parapet, and already a cry of triumph has risen to
his lips, when suddenly, before his horror-stricken gaze, a man surges up, as
if out of the ground, stands there before him for one second, which is as
tense as it is terrifying. Then, with a mighty blow from some heavy weapon
which he holds, he fells the pikeman down. The man loses his footing,
gives a loud cry of horror and falls headlong some forty feet. In his fall he
drags two or three of his comrades with him. But the ladder still stands, and
on it the human ants, reinforced at once by others, resume their climb. Only
for a minute—no more! The next, a pair of hands with titanic strength and a
grip of iron seizes the ladder by the shafts, holds it for one brief, agonizing
moment, and then hurls it down with the whole of its human freight into the
depth below.
An awful cry rends the air, but is quickly drowned by the roar of cannon
and musketry. It has been a mere incident. The Duke has not done more
than mutter an oath in his beard. He is watching the four other ladders on
which his human ants are climbing. But the oath dies on his lips—even he
becomes silent in face of the appalling catastrophe which he sees. That man
up there whom already he has learned to fear, that man in the tattered
doublet and the ragged hose—he it is who has turned the tables on Farnese's
best ruse de guerre. With lightning rapidity and wellnigh superhuman
strength, he repeats his feat once more. Once more a scaling ladder bearing
its precious human freight is hurled down into the depth. The man now
appears like a Titan. Ye gods! or ye devils! which of you gave him that
strength? Now he has reached the third ladder. Just perhaps one second too
late, for the leading pikeman has already gained a foothold upon the
battlements, stands there on guard to shield the ladder; for he has scented
the danger which threatens him and his comrades. His pistol is raised even
as Gilles approaches. The Duke of Parma feels as if his heart had stilled its
beating. Another second, and that daring rebel would be laid low.
But Gilles too has seen the danger—the danger to himself and to the city
which he is defending. No longer has he the time to seize the ladder as he
has done before, no longer the chance of exerting that titanic strength which
God hath lent him so that he might save Cambray. One second—it is the
most precious one this threatened city hath yet known, for in it Fate is
holding the balance, and the life of her defender is at stake. One second!
Just then Gilles has paused in order to gaze once more into the far-away
west. Already the gold of the sun has turned to rose and crimson, already
the low-lying horizon appears aflame with the setting glow. But now upon
the distant horizon line something appears to move, something more swift
and sudden and vivid than the swaying willows by the river bank or the tall
poplars nodding to the evening breeze. Flames of fire dart and flash, a
myriad specks of dust gleam like lurid smoke and the earth shakes with the
tramp of many horses' hoofs. Far away on the Bapaume road the
forerunners of de Balagny's troops are seen silhouetted against the glowing
sky.
Gilles has seen them. Aid has come at last. One more stupendous effort,
one more superhuman exertion of will, and the day is won. He calls aloud
to the depleted garrison, to that handful of men who, brave and undaunted,
stand around him still.
'At them, burghers of Cambray! France comes to your aid! See her
mighty army thundering down the road! Down with the Spaniard! This is
the hour of your victory!'
As many times before, his resonant voice puts heart into them once
again. Once again they grip halberds and lances with the determination born
of hope. They rush to the battlements and with mighty hands hurl the
Spanish scaling ladders from their walls, pick up bits of stone, fragments of
granite and of iron, use these as missiles upon the heads of the attacking
party below. The archers on one knee shoot with deadly precision. They
have been given half a dozen arrows each—the last—and every one of them
finds its mark.
And on the Bapaume road, de Balagny and his troops are quickly
drawing nigh. Already the white banner with the gold Fleur-de-Lys stands
out clearly against the sky.
Parma has seen it, and cursed with savage fury. He is a great and mighty
warrior and knows that the end has come. The day has brought failure and
disgrace; duty now lies in saving a shred of honour and the remnants of a
scattered army. He cannot understand how it has all happened, whence this
French troop has come and by whose orders. He is superstitious and
mystical and fears to see in this the vengeful finger of God. So he crosses
himself and mutters a quick prayer, even as a volley of musketry fired
insolently into the air, reverberates down the Bapaume road.
France is here with her great armies, her unconquered generals: Condé,
Turenne, have come to the rescue. Parma's wearied troops cannot possibly
stand the strain of fighting in the rear whilst still pushing home the attack in
front. How numerous is the French advancing troop it is impossible to
guess. They come with mighty clatter and many useless volleys of
musketry, with jingling of harness and breastplates and clatter of hoofs
upon the road. They come with a mighty shout of 'Valois! and Fleur-de-
Lys!' They wave their banners and strike their lances and pikes together.
They come! They come!
And the half-exhausted Spanish army hears and sees them too. The
halbertmen pause and listen, the archers halt halfway across the moat,
whilst all around the whisper goes from mouth to mouth:
Panic seizes the men. They turn and scurry back over the declivity of the
moat. The stampede has commenced: first the cavalry, then the
infantrymen, for the French are in the rear and legions of unseen spirits
have come to the aid of Cambray.
The Duke of Parma now looks like a broken wreck of his former
arrogant self. His fine accoutrements are torn, the trappings of his charger
are in tatters, his beard has been singed with gunpowder, he has no hat, no
cloak. Raging fury is in his husky voice as he shouts orders and counter-
orders to men who no longer hear. He calls to his officers, alternately
adjures and insults them. But the French troops draw nearer and nearer, and
nothing but Death will stop those running Spanish soldiers now.
To right and left of the Bapaume road they run, leaving that road free for
the passage of de Balagny's small troop. Out in the western sky, the sun is
setting in a mantle of vivid crimson, which is like the colour of human
blood. The last glow illumines the final disgrace of Parma's hitherto
unconquered hordes. The cavalry is galloping back to the distant camp, with
broken reins and stirrups hanging loose, steel bonnets awry, swords, lances,
broken or wilfully thrown aside. Behind them, the infantry, the archers, the
pikemen, the halberdiers—all running and dragging their officers away with
them in their flight.
Parma's unconquered army has ceased to be.
VI
Then it is that Gilles de Crohin stands once again on the very edge of the
broken parapet and fronts the valiant men of Cambray, who have known
how to conquer and how to die. The setting sun draws lines of glowing
crimson round his massive figure. His clothes are now mere tattered rags;
he is bleeding from several wounds; his face is almost unrecognizable, coal-
black with grime and powder; but his eyes still sparkle with pride of
victory.
'Citizens of Cambray, you are free!' he cries. 'Long live France! Long
live the Flower o' the Lily!'
De Landas is near him just then. He too had paused to look once again
on the city which had been his home and which he had so basely betrayed,
and once again on the man whom he hated with an intensity of passion
which this day of glory and infamy had for ever rendered futile.
'If I do,' he retorts exultantly, 'what will your Highness give me?'
De Landas halts, jumps down from his horse, looks about him for a
crossbow and a quiver, and finds what he wants. Then he selects his
position carefully, well under cover and just near enough to get a straight hit
at the man whom he hates more than anything else in the world.
Opportunity seems to favour him. Gilles is standing well forward on the
broken parapet, his throat and chest are bare, his broad figure stands out
clear-cut against the distant sky. He is gazing out towards the west, straight
in the direction where de Landas is cowering—a small, unperceived unit in
the inextricable confusion which reigns around.
He has found the place which best suits his purpose, has placed his stock
in position and adjusted his arrow. Being a Spanish gentleman, he is well
versed in the use of every weapon necessary for war. He takes careful aim,
for he is in no hurry and is determined not to miss.
'Cambray and all it contains!' the Duke of Parma has promised him if he
succeeds in his purpose.
One second, and the deed is done. The arrow has whizzed through the
air. The next instant, Gilles de Crohin has thrown up his arms.
'Citizens of Cambray, wait for France!' he cries, and before any of his
friends can get to him, he has given one turn and then fallen backwards into
the depth below.
De Landas has already thrown down his crossbow, recaptured his horse
and galloped back at break-neck speed in the wake of the flying army.
And even then the joy-bells of Cambray begin to ring their merry peal.
Balagny's troops have entered the city through the open breach in her walls,
whilst down there in the moat, on a pile of dying and dead, her defender and
saviour lies with a murderous arrow in his breast.
VII
De Landas rides like one possessed away from the scene of his dastardly
deed; nor does he draw rein till he has come up once more with the Duke of
Parma.
'At any rate, we are rid of him,' he says curtly. 'And next time we attack,
it will only be with an undisciplined mob that we shall have to deal.'
All around him the mighty army of Parma is melting like snow under the
first kiss of a warm sun. Every man who hath limbs left wherewith to run,
flies panic-stricken down the roads, across fields and rivulets and morasses,
throwing down arms, overturning everything that comes in his way, not
heeding the cries of the helpless and trampling on the dead.
Less than an hour has gone by since France's battle-cry first resounded
on the Bapaume road, and now there is not one Spanish soldier left around
the walls of Cambray, save the wounded and the slain. These lie about
scattered everywhere, like pawns upon an abandoned chess-board. The
moat below the breach is full of them. Maître Jehan le Bègue has not far to
seek for the master and comrade whom he loves so dearly. He has seen him
fall from the parapet, struck by the cowardly hand of an assassin in the very
hour of victory. So, whilst de Balagny's chief captains enter Cambray in
triumph, Jehan seeks in the moat for the friend whom he has lost.
He finds him lying there with de Landas' arrow still sticking in the
wound in his breast. Maître Jehan lifts him as tenderly as a mother would
lift her sick child, hoists him across his broad shoulders, and then slowly
wends his way along the road back to La Fère.
CHAPTER XXV
As for the rest, 'tis in the domain of history. Not only Maître Manuchet,
but Le Carpentier in his splendid History of Cambray, has told us how the
Duke of Parma's armies, demoralized by that day of disasters, took as many
weeks to recuperate and to rally as did the valiant city to recover from her
wounds.
Too late did Parma discover that he had been hoaxed, that the massed
French troops, who had terrified his armies, consisted of a handful of men,
who had been made to shout and to make much noise, so as to scare those
whom they could not have hoped to conquer in open fight. It was too late
now for the great general to retrieve his blunder; but not too late to prepare
a fresh line of action, wait for reinforcements, reorganize the forces at his
command and then to resume the siege of Cambray, with the added hope of
inflicting material punishment upon the rebel city for the humiliation which
she had caused him to endure.
The French armies were still very far away. Parma's numerous spies
soon brought him news that Monsieur Duc d'Anjou, was only now busy in
collecting and training a force which eventually might hope to vie in
strength and equipment with the invincible Spanish troops, whilst the King
of France would apparently have nothing to do with the affair and openly
disapproved of his brother's intervention in the business of the Netherlands.
The moment therefore was all in favour of the Spanish commander; but
even so he did not again try to take Cambray by storm. Many historians
have averred that a nameless superstition was holding him back, that he had
seen in the almost supernatural resistance of the city, the warning finger of
God. Be that as it may, he became, after the day of disaster, content to
invest the approaches to the French frontier, and after awhile, when his
reinforcements had arrived, he formed with his armies a girdle around
Cambray with a view to reducing her by starvation.
II
For four months her citizens waited, confident that the promised help
from France would come in the end. They had hoped and trusted on that
never-to-be-forgotten day four months ago when they covered themselves
with glory, and their trust had not been misplaced. The masked stranger
whom they had followed unto death and victory, the man who had rallied
them and cheered them, who had shown them the example of intrepid
valour and heroic self-sacrifice, had promised them help from France on
that day, and that help had come just as he had promised. Now that he was
gone from them, the burghers and the soldiers, the poor and the rich alike—
aye! even the women and the children—would have felt themselves
eternally disgraced if they had surrendered their city which he had so
magnificently defended.
So they tightened their belts and starved, and waited with stoicism and
patience for the hour of their deliverance.
And every evening when the setting sun threw a shaft of crimson light
through the stately windows of Notre Dame, and the gathering dusk drew
long shadows around the walls, the people of Cambray would meet on the
Place d'Armes inside the citadel, and pray for the return of the hero who had
fought for their liberty. Men and women with pale, gaunt faces, on which
hunger and privations had already drawn indelible lines; men and women,
some of whom had perhaps never before turned their thoughts to anything
but material cares and material pleasures, flocked now to pray beneath the
blue vault of heaven and to think of the man who had saved them from ruin
and disgrace.
Nobody believed that he was dead; though many had seen him fall, they
felt that he would return. God Himself had given Cambray her defender in
the hour of her greatest peril: God had not merely given in order to take
away again. Vague rumours were afloat that the mysterious hero was none
other than the Duc d'Anjou, own brother of the King of France, who one
day would be Sovereign Lord over all the United Provinces; but as to that,
no one cared. He who was gone was the Defender of Cambray: as such, he
was enshrined in thousands of hearts, as such he would return one day to
receive the gratitude and the love of the people who worshipped him.
III
Maître Manuchet, on the other hand, assures us that at one time bread
was entirely unobtainable and that rats and mice formed a part of the daily
menu of the rich. He is more crude in his statements than Le Carpentier, and
even lifts for our discreet gaze just one corner of that veil, wherewith
history has chosen to conceal for ever the anguish of a suffering city. He
shows us three distinct pictures, only sketched in in mere outline, but with
boldness and an obvious regard for truth.
Of the man who hath possession of her heart, she never speaks with
those in authority; but when in a humble home there is talk of the hero who
has gone and of his probable return, she listens in silence, and when
conjectures fly around her as to his identity, she even tries to smile. But in
her heart she knows that her knight—the man whom the people worship—
will never come back. France will send troops and aid and protection anon;
a puissant Prince will enter Cambray mayhap at the head of his troops and
be acclaimed as the saviour of Cambray. She would no doubt in the fullness
of time plight her troth to that man, and the people would be told that this
was indeed the Duc d'Anjou et d'Alençon, who had once before stood upon
the ramparts of Cambray and shouted his defiant cry: 'À moi, citizens; and
let the body of each one of you here be a living rampart for the defence of
your homes!'
But she would know that the man who spoke those inspiring words had
gone from her for ever. Who he was, where he came from, what had
brought him to Cambray under a disguise and an assumed name, she would
perhaps never know. Nor did she care. He was the man she loved: the man
whose passionate ardour had thrilled her to the soul, whose touch had been
as magic, whose voice had been perfect music set in perfect time. He was
the man she loved—her knight. Throughout that day upon the ramparts she
had seen him undaunted, intrepid, unconquered—rallying those who
quaked, cheering those who needed help, regardless of danger, devoted
even unto death. So what cared she what was his name? Whoever he was,
he was worthy of her love.
IV
The second picture which the historian shows us is more dispiriting and
more grim. It is a picture of Cambray in the last days of July. The Spanish
armies have invested the city completely for over eight weeks, and
Cambray has been thrown entirely on her own resources and the activities
of a few bold spirits for the barest necessities of life. Starvation—grim and
unrelenting—is taking her toll of the exhausted population; disease begins
to haunt the abodes of squalor and of misery.
Cambray has fought for her liberty; now she is enduring for it—and
enduring it with a fortitude and determination, which is one Of the most
glorious entries in the book of the recording angel. Every morning at dawn
the heralds of the Spanish commander mount the redoubt on the Bapaume
road, and with a loud flourish of brass trumpets they demand in the name of
His Majesty the King of Spain the surrender of the rebel city. And every
day the summons is answered by a grim and defiant silence. After which,
Cambray settles down to another day of suffering.
The city fathers have worked wonders in organization. From the first, the
distribution of accumulated provisions has been systematic and rigidly fair.
But those distributions, from being scanty have become wholly insufficient,
and lives that before flickered feebly, have gone out altogether, while others
continue a mere struggle for existence, which would be degrading were its
object not so sublime.
Cambray will not surrender! She would sooner starve and rot and be
consumed by fire, but with her integrity whole, her courage undoubted, the
honour of her women unsullied. Disease may haunt her streets, famine
knock at every door; but at least while her citizens have one spark of life
left in their bodies, while their emaciated hands have a vestige of power
wherewith to grasp a musket, no Spanish soldier shall defile her pavements,
no Spanish commander work his tyrannical will with her.
Cambray will not surrender! She believes in her defender and her
saviour!—in his words that France will presently come with invincible
might and powerful armies, when all her sufferings will be turned to relief
and to joy. And every evening when lights are put out and darkness settles
down upon the stricken city, wrapping under her beneficent mantle all the
misery, the terrors and the heroism, men and women lay themselves down
to their broken rest with a last murmur of hope, a last invocation to God for
the return of the hero in whom lies their trust.
And in the Town Hall the city fathers sit in Council, with Messire de
Balagny there, and Monseigneur d'Inchy presiding. They, too, appear
grimly resolved to endure and to hold out; the fire of patriotism and of
enthusiasm burns in their hearts, as it does in the heart of every burgher,
noble or churl in the city. But, side by side with enthusiasm, stalks the grim
shadow of prescience—knowledge of the resources which go, diminishing
bit by bit, until the inevitable hour when hands and mouths will still be
stretched out for food and there will be nothing left to give.
Even now, it is less than bare subsistence which can be doled out day by
day; and in more than one face assembled this day around the Council
Board, there is limned the grim line of nascent despair.
It is only d'Inchy who has not lost one particle of his faith, one particle
of self-confidence and of belief in ultimate triumph.
The Chief Magistrate shakes his head; the Provosts are silent. More than
one man wipes a surreptitious tear.
'We must give the people something to hearten them,' has been the
persistent call from those in authority.
De Balagny interposes:
'Our spies have succeeded in evading the Spanish lines more than once.
One of them returned yesterday from La Fère. He says the Duc d'Anjou is
wellnigh ready. The next month should see the end of our miseries.'
'A month!' sighs the Chief Magistrate. 'The people cannot hold out
another month. They are on the verge of despair.'
'So long delayed,' one of them says. 'The people have ceased to believe
in it.'
'He was struck full in the breast by an arrow,' says another, 'shot by an
unseen hand—some abominable assassin. His Highness gave one turn and
fell into the moat below.'
'And was immediately found and picked up by some of my men,' retorts
de Balagny hotly. 'Mine oath on it! Our spies have seen him—spoken with
him. The Duc d'Anjou is alive and on his way to Cambray. I'd stake on it
the salvation of my soul!'
The others sigh, some of them dubiously, others with renewed hope.
From their talk we gather that not one of them has any doubt in his mind as
to the identity of the brave defender of Cambray. Nothing had in truth
happened to shake their faith in him, and de Balagny had said nothing to
shake that faith. On that fateful day in April they had been convened to
witness the betrothal of Madame Jacqueline de Broyart to Monsieur Duc
d'Anjou, had been presented to His Highness and kissed his hands. Then
suddenly all had been confusion—the panic, the surprise attack, the
runaway soldiers, and finally the one man who rallied every quaking spirit
and defended the city with heart and mind, with counsel and strength of
arm, until he fell by an unseen assassin's hand: he, the Duc d'Anjou, of the
princely House of France—the future Sovereign Lord of a United
Netherlands.