Practical C++20 Financial Programming: Problem Solving for Quantitative Finance, Financial Engineering, Business, and Economics 2nd Edition Carlos Oliveira - The ebook with rich content is ready for you to download
Practical C++20 Financial Programming: Problem Solving for Quantitative Finance, Financial Engineering, Business, and Economics 2nd Edition Carlos Oliveira - The ebook with rich content is ready for you to download
com
OR CLICK HERE
DOWLOAD EBOOK
https://textbookfull.com/product/biota-grow-2c-gather-2c-cook-loucas/
textbookfull.com
https://textbookfull.com/product/practical-numerical-c-programming-
finance-engineering-and-physics-applications-philip-joyce/
textbookfull.com
Matlab A Practical Introduction to Programming and Problem
Solving Stormy Attaway
https://textbookfull.com/product/matlab-a-practical-introduction-to-
programming-and-problem-solving-stormy-attaway/
textbookfull.com
https://textbookfull.com/product/matlab-a-practical-introduction-to-
programming-and-problem-solving-stormy-attaway-2/
textbookfull.com
https://textbookfull.com/product/engineering-economics-financial-
decision-making-for-engineers-5th-edition-niall-fraser/
textbookfull.com
https://textbookfull.com/product/reading-financial-reports-for-
dummies-for-dummies-business-personal-finance-4th-edition-epstein/
textbookfull.com
https://textbookfull.com/product/engineering-problem-solving-with-c-
fourth-edition-delores-maria-etter/
textbookfull.com
Carlos Oliveira
The publisher, the authors and the editors are safe to assume that the
advice and information in this book are believed to be true and accurate
at the date of publication. Neither the publisher nor the authors or the
editors give a warranty, expressed or implied, with respect to the
material contained herein or for any errors or omissions that may have
been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.
Audience
This book is intended for readers who already have a working
knowledge of programming in C, C++, or another mainstream language.
These are usually professionals or advanced students in computer
science, engineering, physics, and mathematics, who have an interest in
learning C++20 financial programming either for personal
improvement or for professional reasons. The book is also directed at
practitioners of C++ programming in financial institutions, who would
use the book as a ready-to-use reference for common development
problems.
By reading this book, you will learn how to use modern C++20
techniques to implement practical applications. Being a multi-paradigm
language, C++ is used slightly differently in each application area.
Therefore, skills that are valuable for developing desktop applications
are not necessarily the same as those used to write high-performance
software. A large part of major high-performance financial applications
are written in C++, which means that programmers who want to enter
this lucrative market need to acquire a working knowledge of a few
specific and relevant parts of the language. This book therefore would
be an excellent choice for developers who want to advance their
knowledge effectively while learning one of the most sought-after and
marketable skill sets for modern applications and high-performance
software development.
Content Overview
Here is a brief overview of the contents of each chapter.
Chapter 1 —The Fixed Income Market: The fixed income market
is a large part of the financial engineering industry, and it presents
unique computational challenges for its practitioners. C++
programming is widely used in this area, offering the ability to compute
rates and cash flow variations with incredible speed, as readers will
learn in this chapter. I present C++ coding examples that can be used in
the solution of some of the most common problems occurring in fixed
income markets. I include C++ algorithms for topics such as (1) interest
rate calculation, (2) present value computation, (3) cash flows, and (4)
valuation of bonds.
Chapter 2 —The Equities Market: Equity markets are multifaceted
and offer a great variety of investment vehicles. As a result, the number
and complexity of computational techniques used for financial analysis
of equity markets continue to grow. In this chapter, I present C++
examples for a few selected problems occurring in the equities markets
and their derivatives. I cover programming topics such as the following:
(1) moving average computation, (2) calculating volatility, (3)
computing instrument correlation, and (3) calculating fundamental
indicators.
Chapter 3 —C++ Programming Techniques in Finance: The C++
language was created as an extension of C, which means that most
programs written in C are also valid C++ programs. However, good C++
programs need to make use of high-level features made available by the
language to control program complexity. This is especially important
for financial applications, where we want to create fast and expressive
applications. In this chapter, I explore fundamental techniques that
financial C++ programmers use to write better code with less effort,
including (1) class templates, (2) auto pointers, (3) shared pointers, (4)
resource acquisition is initialization (RAII), (5) automatic type
detection, (6) exception handling, and (7) operator overloading.
Chapter 4 —Common Libraries for Financial Applications:
Modern coding in C++ uses libraries that simplify the creation of fast,
standard-conforming classes. The STL offers a set of generic, standard
containers that can be used in almost any situation. Knowing how to
use the STL well is one of the main skills necessary for effective C++
programming. Another common set of classes is contained in the Boost
libraries, which are usually the basis for the next version of the C++
standard. Readers will learn about topics such as (1) STL containers,
(2) STL algorithms, (3) boost libraries, and (4) date and time handling.
Chapter 5 —Designing Numerical Classes: At the heart of
financial applications is a set of well-designed numerical classes. This
chapter tells you how to create numerical classes that will perform
efficiently when used in production code. You will also see examples in
C++ that show how to integrate with existing numerical classes and
algorithms. You will learn how to (1) implement a matrix class, (2)
perform calculations at compilation time with templates, (3) represent
ratios with C++ templates, and (4) generate statistical data.
Chapter 6 —Plotting Financial Data: A common activity in
financial programming is the generation of data that needs to be
visualized by traders or other financial stakeholders. Most of the time,
the data needs to be plotted in the form of a chart for easy visualization.
I give a few examples that show how to plot data in C++ programs using
common libraries. You will learn about topics such as (1) using Gnuplot
to plot data, (2) designing a class to create Gnuplot charts, and (3)
plotting from a GUI (graphical user interface) application using Qt.
Chapter 7 —Linear Algebra: Linear algebra (LA) techniques are
used throughout the area of financial engineering. Therefore, it is
important to understand how the traditional methods of LA can be
applied in C++. With this goal in mind, I present a few examples that
show how to use some of the most common LA algorithms. In this
chapter, you will also learn about (1) integrating existing LA libraries
into your code, (2) basic LA operations, (3) the BLAS (basic linear
algebra subprograms) library, and (4) calculating the determinant of a
matrix with BLAS.
Chapter 8 —Interpolation: Interpolation is a commonly used
technique that finds a mathematical function approximating a set of
points. Fast interpolation is the secret for high-performance algorithms
in several areas of financial engineering. This chapter will show you
programming samples that cover a few of the most common
interpolation methods, with efficient implementation in C++. The main
techniques discussed in this chapter are (1) linear interpolation and (2)
polynomial interpolation.
Chapter 9 —Calculating Roots of Equations: Equations are one of
the building blocks of algorithms in financial engineering, and it is
important to be able to calculate equation roots efficiently. In this
chapter, you will find algorithms for different methods of calculating
equation roots, along with explanations of how they work and when
they should be used. Topics include (1) the bisection method, (2) the
secant method, and (3) Newton’s method.
Chapter 10 —Numerical Integration: Function integration is a
common part of many financial algorithms. However, it is hard to solve
certain classes of equations exactly, and numerical methods need to be
employed in such cases. In this chapter, you will see examples of C++
code that can be readily applied to common integration problems. I also
discuss the performance and the accuracy of such methods. The
programming examples in this chapter cover topics such as (1) the
midpoint method, (2) the trapezoid method, and (3) Simpson’s method.
Chapter 11 —Solving ODEs and PDEs: Differential equations are
at the heart of many techniques used in the analysis of equity markets.
There are several processes for solving and analyzing ordinary
differential equations (ODE) and partial differential equations (PDE)
that can be implemented in C++. In this chapter, I present programming
examples that cover aspects of ODEs and PDE modeling and application
in C++. Topics covered include the following: (1) solving ODEs, (2)
using the Runge-Kutta method, and (3) solving the Black-Scholes
equation.
Chapter 12 —Optimization: Optimization refers to a set of
techniques used to find the minimum or maximum of a function.
Optimization strategies are used in several areas of financial
engineering. In this chapter, I discuss programming techniques that can
be used to implement common aspects of optimization algorithms. I
provide a concise explanation of some techniques and how they are
typically implemented in C++20. You will learn about (1) modeling
optimization problems, (2) interfacing with linear programming (LP)
solvers, (3) solving two-dimensional LP problems, and (4) mixed
integer–programming models.
Chapter 13 —Asset and Portfolio Optimization: Portfolio
managers have to face the issue of balancing a portfolio for optimal
performance, depending on their predefined portfolio goals.
Optimization-based techniques have been developed to deal with some
of the most common portfolio construction problems. In this chapter,
we consider algorithms for portfolio optimization using C++. We
consider how to design such optimization code in order to get results
that are as fast and as accurate as possible. Topics include (1) creating a
portfolio model, (2) performing resource allocation, and (3) using
linear techniques for portfolio optimization.
Chapter 14 —Monte Carlo Methods: Among other programming
techniques used in equity markets analysis, Monte Carlo simulation has
a special place due to its wide applicability and easy implementation.
These methods can be used to forecast prices or to validate buying
strategies, for example. In this chapter, I provide programming
examples that can be used as part of simulation-based algorithms, with
topics such as (1) random number generation, (2) optimization through
Monte Carlo methods, and (3) simulation models for price forecasting.
Chapter 15 —Extending Financial Libraries: C++ is a complete
language that can be used to develop the most complex software.
However, it is sometimes beneficial to combine C++ libraries with
scripting languages that can simplify the creation of prototypes and
other noncritical applications. In this chapter, I show you how to use
the solutions and algorithms discussed in the text as external libraries
for scripting languages that are commonly employed in the financial
industry. In particular, you will learn how to (1) extend C++ with
Python and (2) extend C++ with Lua scripts.
Chapter 16 —Using C++ Code with R and Maxima: Financial
algorithms in C++ can be used not only as part of executable code but
also as part of other modeling and development environments. In this
chapter, I show you how to integrate financial libraries into two well-
known simulation and modeling environments for financial analysis: R
and Maxima. You will see how it is possible to create loadable modules
for these environments, incorporating complex C++ algorithms in a way
that they are ready to use from scripts written in R and Maxima.
Chapter 17 —Multithreading: Financial applications have very
stringent performance requirements. A common way to improve
response time is to use concurrency and parallel programming
techniques, such as multithreading. C++ can be used to write very
responsive multithreaded applications, and in this chapter, I explore
algorithms for creating and managing threads, with applications to
financial problems. I also cover the important topic of data access
synchronization. Topics include (1) creating threads, (2) protecting
shared memory, (3) synchronization techniques, and (4) threads using
the standard library.
Appendix A—C++20 Features: C++ is an evolving language, and in
the last few years, we have seen a renewed effort to bring much-needed
updates. The latest efforts are the C++17 and C++20 standards, and
major C++ compilers are incorporating these features at a fast pace. In
the appendix, I cover examples that show how some of these features
can improve your code and simplify the development of new programs
and libraries. You will learn about new features such as (1) auto
variables, (2) closures, (3) rvalues, (4) const expressions, and (5)
initializer lists.
The fixed income market is a large part of the financial industry, and it presents
unique challenges and opportunities for its practitioners. A large amount of the
money managed by pension funds and other institutional funds is allocated to
fixed income investments. Because fixed income has a predictable income stream,
conservative money managers view it as a safer investment option when
compared to stocks and more exotic derivatives. As a result, traditional
institutions commit a lot of time and effort to the fixed income industry.
As software engineers, our main goal when working in the fixed income
market is to define computational strategies and solve problems so that our
clients can be successful. C++ is a language that is uniquely poised to the solution
of problems in this industry. This is due to its flexibility and high performance on
standard computational platforms. Moreover, C++ is a highly portable language
that can be used in a variety of computer systems.
As a result of the advantages just mentioned, C++ programing has been widely
used in this area of finance, and it is one of the preferred languages used in banks,
hedge funds, pension funds, and other large institutions that have to deal with
fixed income as one of their main investment vehicles. Programmers who work
with C++ have over the years developed software that offers useful capabilities for
fixed income analysis, such as computing prevailing interest rates and
determining cash flow valuations. All of these features need to execute with
incredible speed, with the help of some of the techniques explored in later
sections of this book. Due to its new standard, C++20, the language is nowadays
even more capable of satisfying the strict requirements demanded by the financial
industry.
In this chapter, I provide a quick introduction to this area of finance and show
you a few C++ coding examples that can be used in the solution of some of the
most common programming problems occurring in fixed income markets. These
coding examples include the solution to problems involving
Simple interest rate calculation
Compound interest rate calculation
Cash flow modeling
Determination of the present value of cash flows
Modeling and valuation of bonds
In the remainder of this chapter, I will also show you why C++20 may be the
ideal language to deal with programming problems occurring in the financial
investment industry and in particular how to solve problems in fixed income
investing. Then, I will provide a general introduction to the issues occurring in
fixed income investments and an overview of how the fixed income market works.
Then, I will start with a few programming examples that explore the concepts
discussed in the previous sections.
Note Fixed income investments have risks that are hard to measure because
they depend on the future economic environment. Sound fixed income
investments need to take into consideration the several risks involved. High-
quality C++ software for fixed income may help investors to take into
consideration some of these external factors.
Here are some of the most important concepts about fixed income investments
used through this chapter.
Interest rate: The return of investment in percentage points for a given period
(usually 1 year). Fixed income investments will have a well-defined interest rate
that is determined as a contractual obligation.
Principal: The amount of the original fixed income loan or investment. This is
the value over which the interest rate is calculated in the case of a fixed income
investment such as a bond.
Compound interest: Interest that is accrued over time and added to the
principal as regular interest payments are made at each period. The amount of
compound interest is regulated by the interval between interest payments.
Continuous compounding: As the number of periods increase, the effect of
compound interest becomes more pronounced. For example, compound
Discovering Diverse Content Through
Random Scribd Documents
And—if the truth MUST come—not THEY alone.
Næv. Right: and to some this trade has answered yet;
But not to me: for what is all I get?
A drugget cloak, to save my gown from rain,}
Coarse in its texture, dingy in its grain,} 40
And a few pieces of the "second vein!"}
Fate governs all. Fate, with full sway, presides
Even o'er those parts, which modest nature hides;
And little, if her genial influence fail,
Will vigor stead, or boundless powers avail: 45
Though Virro, gloating on your naked charms,
Foam with desire, and woo you to his arms,
With many a soothing, many a flattering phrase—
For your cursed pathics have such winning ways!
Hear now this prodigy, this mass impure, 50
Of lust and avarice! "Let us, friend, be sure:
I've given thee this, and this;—now count the sums:"
(He counts, and woos the while), "behold! it comes
To five sestertia, five!—now, look again,
And see how much it overpays thy pain:" 55
What! "overpays?"—but you are formed for love,
And worthy of the cup and couch of Jove!
—Will those relieve a client!—those, who grudge
A wretched pittance to the painful drudge
That toils in their disease?—O mark, my friend, 60
The blooming youth, to whom we presents send,
Or on the Female Calends, or the day
Which gave him birth! in what a lady-way
He takes our favors as he sits in state,
And sees adoring crowds besiege his gate! 65
Insatiate sparrow! whom do your domains,
Your numerous hills await, your numerous plains?
Regions, that such a tract of land embrace,
That kites are tired within the unmeasured space!
For you the purple vine luxuriant glows, 70
On Trifoline's plain, and on Misenus' brows;
And hollow Gaurus, from his fruitful hills,
Your spacious vaults with generous nectar fills:
What were it, then, a few poor roods to grant
To one so worn with lechery and want? 75
Sure yonder female, with the child she bred,
The dog their playmate, and their little shed,
Had, with more justice, been conferred on me,
Than on a cymbal-beating debauchee!
"I'm troublesome," you say, when I apply, 80
"And give! give! give! is my eternal cry."—
But house-rent due solicits to be sped,
And my sole slave, importunate for bread,
Follows me, clamoring in as loud a tone
As Polyphemus, when his prey was flown. 85
Nor will this one suffice, the toil's so great!
Another must be bought; and both must eat.
What shall I say, when cold December blows,
And their bare limbs shrink at the driving snows,
What shall I say, their drooping hearts to cheer? 90
"Be merry, boys, the spring will soon be here!"
But though my other merits you deny,
One yet must be allowed—that had not I,
I, your devoted client, lent my aid,
Your wife had to this hour remained a maid. 95
You know what motives urged me to the deed,
And what was promised, could I but succeed:—
Oft in my arms the flying fair I caught,
And back to your cold bed, reluctant, brought,
Even when she'd canceled all her former vows, 100
And now was signing to another spouse.
What pains it cost to set these matters right,
While you stood whimpering at the door all night,
I spare to tell:—a friend like me has tied
Full many a knot, when ready to divide. 105
Where will you turn you now, sir? whither fly?
What, to my charges, first, or last, reply?
Is it no merit, speak, ungrateful! none,
To give you thus a daughter, or a son,
Whom you may breed with credit at your board, 110
And prove yourself a man upon record?—
Haste, with triumphal wreaths your gates adorn,
You're now a father, now no theme for scorn;
My toils have ta'en the opprobrium from your name,
And stopp'd the babbling of malicious fame. 115
A parent's rights you now may proudly share,
Now, thank my industry, be named an heir;
Take now the whole bequest, with what beside,
From lucky windfalls, may in time betide;
And other blessings, if I but repeat 120
My pains, and make the number THREE complete.
Juv. Nay, thou hast reason to complain, I feel:
But, what says Virro?
Næv. Not a syllable;
But, while my wrongs and I unnoticed pass,
Hunts out some other drudge, some two-legged ass. 125
Enough;—and never, on your life, unfold
The secret thus to you, in friendship told;
But let my injuries, undivulged, still rest
Within the closest chamber of your breast:
How the discovery might be borne, none knows— 130
And your smooth pathics are such fatal foes!
Virro, who trusts me yet, may soon repent,
And hate me for the confidence he lent;
With fire and sword my wretched life pursue,
As if I'd blabbed already all I knew. 135
Sad situation mine! for, in your ear,
The rich can never buy revenge too dear;
And—but enough: be cautious, I entreat,
And secret as the Athenian judgment-seat.
Juv. And dost thou seriously believe, fond swain, 140
The actions of the great unknown remain?
Poor Corydon! even beasts would silence break,
And stocks and stones, if servants did not, speak.
Bolt every door, stop every cranny tight,
Close every window, put out every light; 145
Let not a whisper reach the listening ear,
No noise, no motion; let no soul be near;
Yet all that passed at the cock's second crow,
The neighboring vintner shall, ere daybreak, know;
With what besides the cook and carver's brain, 150
Subtly malicious, can in vengeance feign!
For thus they glory, with licentious tongue,
To quit the harsh command and galling thong.
Should these be mute, some drunkard in the streets
Will pour out all he knows to all he meets, 155
Force them, unwilling, the long tale to hear,
And with his stories drench their hapless ear.
Go now, and earnestly of those request,
To lock, like me, the secret in their breast:
Alas! they hear thee not; and will not sell 160
The dear, dear privilege—to see and tell,
For more stolen wine than late Saufeia boused,
When, for the people's welfare, she—caroused!
Live virtuously:—thus many a reason cries,
But chiefly this, that so thou may'st despise 165
Thy servant's tongue; for, lay this truth to heart,
The tongue is the vile servant's vilest part:
Yet viler he, who lives in constant dread
Of the domestic spies that—eat his bread.
Næv. Well have you taught, how we may best disdain 170
The envenomed babbling of our household train;
But this is general, and to all applies:—
What, in my proper case, would you advise?
After such flattering expectations cross'd,
And so much time in vain dependence lost? 175
For youth, too transient flower! of life's short day
The shortest part, but blossoms—to decay.
Lo! while we give the unregarded hour
To revelry and joy, in Pleasure's bower,
While now for rosy wreaths our brows to twine, 180
And now for nymphs we call, and now for wine,
The noiseless foot of Time steals swiftly by,
And ere we dream of manhood, age is nigh!
Juv. Oh, fear not: thou canst never seek in vain
A pathic friend, while these seven hills remain. 185
Hither in crowds the master-misses come,
From every point, as to their proper home:
One hope has failed, another may succeed;
Meanwhile do thou on hot eringo feed.
Næv. Tell this to happier men; the Fates ne'er meant 190
Such luck for me: my Clotho is content,
When all my oil a bare subsistence gains,
And fills my belly, by my back and reins.
O, my poor Lares! dear, domestic Powers!
To whom I come with incense, cakes, and flowers, 195
When shall my prayers, so long preferred in vain,
Acceptance find? O, when shall I obtain
Enough to free me from the constant dread
Of life's worst ill, gray hairs and want of bread?
On mortgage, six-score pounds a year, or eight, 200
A little sideboard, which, for overweight,
Fabricius would have censured; a stout pair
Of hireling Mæsians, to support my chair,
In the thronged Circus: add to these, one slave
Well skilled to paint, another to engrave; 205
And I—but let me give these day-dreams o'er—
Wish as I may, I ever shall be poor;
For when to Fortune I prefer my prayers,
The obdurate goddess stops at once her ears;
Stops with that wax which saved Ulysses' crew,} 210
When by the Syrens' rocks and songs they flew,}
False songs and treacherous rocks, that all to ruin drew.}
SATIRE X.
In every clime, from Ganges' distant stream
To Gades, gilded by the western beam,
Few, from the clouds of mental error free,
In its true light or good or evil see.
For what, with reason, do we seek or shun? 5
What plan, how happily soe'er begun,
But, finished, we our own success lament,
And rue the pains, so fatally misspent?—
To headlong ruin see whole houses driven,
Cursed with their prayers, by too indulgent heaven! 10
Bewildered thus by folly or by fate,
We beg pernicious gifts in every state,
In peace, in war. A full and rapid flow
Of eloquence, lays many a speaker low:
Even strength itself is fatal; Milo tries 15
His wondrous arms, and—in the trial dies!
But avarice wider spreads her deadly snare,
And hoards amassed with too successful care,
Hoards, which o'er all paternal fortunes rise,
As o'er the dolphin towers the whale in size. 20
For this, in other times, at Nero's word,
The ruffian bands unsheathed the murderous sword,
Rushed to the swelling coffers of the great,
Chased Lateranus from his lordly seat,
Besieged too-wealthy Seneca's wide walls, 25
And closed, terrific, round Longinus' halls:
While sweetly in their cocklofts slept the poor,
And heard no soldier thundering at their door.
The traveler, freighted with a little wealth,
Sets forth at night, and wins his way by stealth: 30
Even then, he fears the bludgeon and the blade,
And starts and trembles at a rush's shade;
While, void of care, the beggar trips along,
And, in the spoiler's presence, trolls his song.
The first great wish, that all with rapture own, 35
The general cry, to every temple known,
Is, gold, gold, gold!—"and let, all-gracious Powers,
The largest chest the Forum boasts be ours!"
Yet none from earthen bowls destruction sip:
Dread then the draught, when, mantling, at your lip, 40
The goblet sparkles, radiant from the mine,
And the broad gold inflames the ruby wine.
And do we, now, admire the stories told
Of the two Sages, so renowned of old;
How this forever laughed, whene'er he stepp'd 45
Beyond the threshold; that, forever wept?
But all can laugh:—the wonder yet appears,
What fount supplied the eternal stream of tears!
Democritus, at every step he took,
His sides with unextinguished laughter shook, 50
Though, in his days, Abdera's simple towns
No fasces knew, chairs, litters, purple gowns.—
What! had he seen, in his triumphal car,
Amid the dusty Cirque, conspicuous far,
The Prætor perched aloft, superbly dress'd 55
In Jove's proud tunic, with a trailing vest
Of Tyrian tapestry, and o'er him spread
A crown, too bulky for a mortal head,
Borne by a sweating slave, maintained to ride
In the same car, and mortify his pride! 60
Add now the bird, that, with expanded wing,
From the raised sceptre seems prepared to spring;
And trumpets here; and there the long parade
Of duteous friends, who head the cavalcade;
Add, too, the zeal of clients robed in white,} 65
Who hang upon his reins, and grace the sight,}
Unbribed, unbought—save by the dole, at night!}
Yes, in those days, in every varied scene,
The good old man found matter for his spleen:
A wondrous sage! whose story makes it clear 70
That men may rise in folly's atmosphere,
Beneath Bœotian fogs, of soul sublime,
And great examples to the coming time.—
He laughed aloud to see the vulgar fears,
Laughed at their joys, and sometimes at their tears: 75
Secure the while, he mocked at Fortune's frown,
And when she threatened, bade her hang or drown!
Superfluous then, or fatal, is the prayer,
Which, to the Immortals' knees, we fondly bear.
Some, Power hurls headlong from her envied height, 80
Some, the broad tablet, flashing on the sight,
With titles, names: the statues, tumbled down,
Are dragged by hooting thousands through the town;
The brazen cars torn rudely from the yoke,
And, with the blameless steeds, to shivers broke— 85
Then roar the flames! the sooty artist blows,
And all Sejanus in the furnace glows;
Sejanus, once so honored, so adored,
And only second to the world's great lord,
Runs glittering from the mould, in cups and cans, 90
Basins and ewers, plates, pitchers, pots, and pans.
"Crown all your doors with bay, triumphant bay!
Sacred to Jove, the milk-white victim slay,
For lo! where great Sejanus by the throng,
A joyful spectacle! is dragged along. 95
What lips! what cheeks! ha, traitor!—for my part,
I never loved the fellow—in my heart."
"But tell me; Why was he adjudged to bleed?
And who discovered? and who proved the deed?"
"Proved!—a huge, wordy letter came to-day 100
From Capreæ." Good! what think the people? They!
They follow fortune, as of old, and hate,
With their whole souls, the victim of the state.
Yet would the herd, thus zealous, thus on fire,
Had Nurscia met the Tuscan's fond desire, 105
And crushed the unwary prince, have all combined,
And hailed Sejanus, Master of Mankind!
For since their votes have been no longer bought,
All public care has vanished from their thought;
And those who once, with unresisted sway, 110
Gave armies, empire, every thing, away,
For two poor claims have long renounced the whole,
And only ask—the Circus and the Dole.
"But there are more to suffer." "So I find;
A fire so fierce for one was ne'er designed. 115
I met my friend Brutidius, and I fear,
From his pale looks, he thinks there's danger near.
What if this Ajax, in his phrensy, strike,
Suspicious of our zeal, at all alike!"
"True: fly we then, our loyalty to show; 120
And trample on the carcass of his foe,
While yet exposed on Tiber's banks it lies"—
"But let our slaves be there," another cries:
"Yes; let them (lest our ardor they forswear,
And drag us, pinioned, to the Bar) be there." 125
Thus of the favorite's fall the converse ran,
And thus the whisper passed from man to man.
Lured by the splendor of his happier hour,
Would'st thou possess Sejanus' wealth and power;
See crowds of suppliants at thy levee wait, 130
Give this to sway the army, that the state;
And keep a prince in ward, retired to reign
O'er Capreæ's crags, with his Chaldean train?
Yes, yes, thou would'st (for I can read thy breast)
Enjoy that favor which he once possess'd, 135
Assume all offices, grasp all commands,
The Imperial Horse, and the Prætorian Bands.
'Tis nature, this; even those who want the will,
Pant for the dreadful privilege to kill:
Yet what delight can rank and power bestow, 140
Since every joy is balanced by its woe!
—Still would'st thou choose the favorite's purple, say?
Or, thus forewarned, some paltry hamlet sway?
At Gabii, or Fidenæ, rules propound,
For faulty measures, and for wares unsound; 145
And take the tarnished robe, and petty state,
Of poor Ulubræ's ragged magistrate?—
You grant me then, Sejanus grossly erred,
Nor knew what prayer his folly had preferred:
For when he begged for too much wealth and power, 150
Stage above stage, he raised a tottering tower,
And higher still, and higher; to be thrown,
With louder crash, and wider ruin down!
What wrought the Crassi, what the Pompeys' doom,
And his, who bowed the stubborn neck of Rome? 155
What but the wild, the unbounded wish to rise,
Heard, in malignant kindness, by the skies!
Few kings, few tyrants, find a bloodless end,
Or to the grave, without a wound, descend.
The child, with whom a trusty slave is sent, 160
Charged with his little scrip, has scarcely spent
His mite at school, ere all his bosom glows
With the fond hope he never more foregoes,
To reach Demosthenes' or Tully's name,
Rival of both in eloquence and fame!— 165
Yet by this eloquence, alas! expired
Each orator, so envied, so admired!
Yet by the rapid and resistless sway
Of torrent genius, each was swept away!
Genius, for that, the baneful potion sped, 170
And lopp'd, from this, the hands and gory head:
While meaner pleaders unmolested stood,
Nor stained the rostrum with their wretched blood.
"How fortuNATE A NATAL day was thine,
In that LATE conSULATE, O Rome, of mine!" 175
Oh, soul of eloquence! had all been found
An empty vaunt, like this, a jingling sound,
Thou might'st, in peace, thy humble fame have borne,
And laughed the swords of Antony to scorn!
Yet this would I prefer, the common jest, 180
To that which fired the fierce triumvir's breast,
That second scroll, where eloquence divine
Burst on the ear from every glowing line.
And he too fell, whom Athens, wondering, saw
Her fierce democracy, at will, o'erawe, 185
And "fulmine over Greece!" some angry Power
Scowled, with dire influence, on his natal hour.—
Bleared with the glowing mass, the ambitious sire,
From anvils, sledges, bellows, tongs, and fire,
From tempting swords, his own more safe employ, 190
To study RHETORIC, sent his hopeful boy.
The spoils of WAR; the trunk in triumph placed
With all the trophies of the battle graced,
Crushed helms, and battered shields; and streamers borne
From vanquished fleets, and beams from chariots torn; 195
And arcs of triumph, where the captive foe
Bends, in mute anguish, o'er the pomp below,
Are blessings, which the slaves of glory rate
Beyond a mortal's hope, a mortal's fate!
Fired with the love of these, what countless swarms, 200
Barbarians, Romans, Greeks, have rushed to arms,
All danger slighted, and all toil defied,
And madly conquered, or as madly died!
So much the raging thirst of fame exceeds
The generous warmth, which prompts to worthy deeds, 205
That none confess fair virtue's genuine power,
Or woo her to their breast, without a dower.
Yet has this wild desire, in other days,
This boundless avarice of a few for praise,
This frantic rage for names to grace a tomb, 210
Involved whole countries in one general doom;
Vain "rage!" the roots of the wild fig-tree rise,
Strike through the marble, and their memory dies!
For, like their mouldering tenants, tombs decay,
And, with the dust they hide, are swept away. 215
Produce the urn that Hannibal contains,
And weigh the mighty dust, which yet remains:
And is this all! Yet THIS was once the bold,
The aspiring chief, whom Afric could not hold,
Though stretched in breadth from where the Atlantic roars, 220
To distant Nilus, and his sun-burnt shores;
In length, from Carthage to the burning zone,
Where other moors, and elephants are known.
—Spain conquered, o'er the Pyrenees he bounds:
Nature opposed her everlasting mounds, 225
Her Alps, and snows; o'er these, with torrent force,
He pours, and rends through rocks his dreadful course.
Already at his feet, Italia lies;—
Yet thundering on, "Think nothing done," he cries,
"Till Rome, proud Rome, beneath my fury falls, 230
And Afric's standards float along her walls!"
Big words!—but view his figure! view his face!
O, for some master-hand the lines to trace,
As through the Etrurian swamps, by floods increas'd,
The one-eyed chief urged his Getulian beast! 235
But what ensued? Illusive Glory, say.
Subdued on Zama's memorable day,
He flies in exile to a petty state,
With headlong haste! and, at a despot's gate,
Sits, mighty suppliant! of his life in doubt, 240
Till the Bithynian's morning nap be out.
No swords, nor spears, nor stones from engines hurled,
Shall quell the man whose frown alarmed the world:
The vengeance due to Cannæ's fatal field,
And floods of human gore, a ring shall yield!— 245
Fly, madman, fly! at toil and danger mock,
Pierce the deep snow, and scale the eternal rock,
To please the rhetoricians, and become
A DECLAMATION for the boys of Rome!
One world, the ambitious youth of Pella found 250
Too small; and tossed his feverish limbs around,
And gasped for breath, as if immured the while
In Gyaræ, or Seripho's rocky isle:
But entering Babylon, found ample room
Within the narrow limits of a tomb! 255
Death, the great teacher, Death alone proclaims
The true dimensions of our puny frames.
The daring tales, in Grecian story found,
Were once believed:—of Athos sailed around,
Of fleets, that bridges o'er the waves supplied, 260
Of chariots, rolling on the steadfast tide,
Of lakes exhausted, and of rivers quaff'd,
By countless nations, at a morning's draught,
And all that Sostratus so wildly sings,
Besotted poet, of the king of kings. 265
But how returned he, say? this soul of fire,
This proud barbarian, whose impatient ire
Chastised the winds, that disobeyed his nod,
With stripes, ne'er suffered from the Æolian god;
Fettered the Shaker of the sea and land— 270
But, in pure clemency, forbode to brand!
And sure, if aught can touch the Powers above,
This calls for all their service, all their love!
But how returned he? say;—His navy lost,
In a small bark he fled the hostile coast, 275
And, urged by terror, drove his laboring prore,
Through floating carcasses, and floods of gore.
So Xerxes sped, so speed the conquering race;
They catch at glory, and they clasp disgrace!
"Life! length of life!" For this, with earnest cries, 280
Or sick or well, we supplicate the skies.
Pernicious prayer! for mark what ills attend,
Still, on the old, as to the grave they bend:
A ghastly visage, to themselves unknown,
For a smooth skin, a hide with scurf o'ergrown, 285
And such a cheek, as many a grandam ape,
In Tabraca's thick woods, is seen to scrape.
Strength, beauty, and a thousand charms beside,
With sweet distinction, youth from youth divide;
While age presents one universal face: 290
A faltering voice, a weak and trembling pace,
An ever-dropping nose, a forehead bare,
And toothless gums to mumble o'er its fare.
Poor wretch, behold him, tottering to his fall,
So loathsome to himself, wife, children, all, 295
That those who hoped the legacy to share,
And flattered long—disgusted, disappear.
The sluggish palate dulled, the feast no more
Excites the same sensations as of yore;
Taste, feeling, all, a universal blot, 300
And e'en the rites of love remembered not:
Or if—through the long night he feebly strives
To raise a flame where not a spark survives;
While Venus marks the effort with distrust,
And hates the gray decrepitude of lust. 305
Another loss!—no joy can song inspire,
Though famed Seleucus lead the warbling quire:
The sweetest airs escape him; and the lute,
Which thrills the general ear, to him is mute.—
He sits, perhaps, too distant: bring him near; 310
Alas! 'tis still the same: he scarce can hear
The deep-toned horn, the trumpet's clanging sound,
And the loud blast which shakes the benches round.
Even at his ear, his slave must bawl the hour,
And shout the comer's name, with all his power! 315
Add that a fever only warms his veins,
And thaws the little blood which yet remains;
That ills of every kind, and every name,
Rush in, and seize the unresisting frame.
Ask you how many? I could sooner say 320
How many drudges Hippia kept in pay,
How many orphans Basilus beguiled,
How many pupils Hæmolus defiled,
How many men long Maura overmatched,
How many patients Themison dispatched 325
In one short autumn; nay, perhaps, record,
How many villas call my quondam barber lord!
These their shrunk shoulders, those their hams bemoan;
This hath no eyes, and envies that with one:
This takes, as helpless at the board he stands, 330
His food, with bloodless lips, from others' hands;
While that, whose eager jaws, instinctive, spread
At every feast, gapes feebly to be fed,
Like Progne's brood, when, laden with supplies,
From bill to bill, the fasting mother flies. 335
But other ills, and worse, succeed to those:
His limbs long since were gone; his memory goes.
Poor driveler! he forgets his servants quite,
Forgets, at morn, with whom he supped at night;
Forgets the children he begot and bred; 340
And makes a strumpet heiress in their stead.—
So much avails it the rank arts to use,
Gained, by long practice, in the loathsome stews!
But grant his senses unimpaired remain;
Still woes on woes succeed, a mournful train! 345
He sees his sons, his daughters, all expire,
His faithful consort on the funeral pyre,
Sees brothers, sisters, friends, to ashes turn,
And all he loved, or loved him, in their urn.
Lo here, the dreadful fine we ever pay 350
For life protracted to a distant day!
To see our house by sickness, pain pursued,
And scenes of death incessantly renewed:
In sable weeds to waste the joyless years,
And drop, at last, mid solitude and tears! 355
The Pylian's (if we credit Homer's page)
Was only second to the raven's age.
"O happy, sure, beyond the common rate,
Who warded off, so long, the stroke of fate!
Who told his years by centuries, who so oft 360
Quaffed the new must! O happy, sure"—But, soft.
This "happy" man of destiny complained,
Cursed his gray hairs, and every god arraigned;
What time he lit the pyre, with streaming eyes,
And, in dark volumes, saw the flames arise 365
Round his Antilochus:—"Tell me," he cried,
To every friend who lingered at his side,
"Tell me what crimes have roused the Immortals' hate,
That thus, in vengeance, they protract my date?"
So questioned heaven Laertes—Peleus so— 370
(Their hoary heads bowed to the grave with woe)
While this bewailed his son, at Ilium slain;
That his, long wandering o'er the faithless main.
While Troy yet flourished, had her Priam died,
With what solemnity, what funeral pride, 375
Had he descended, every duty paid,
To old Assaracus, illustrious shade!—
Hector himself, bedewed with many a tear,
Had joined his brothers to support the bier;
While Troy's dejected dames, a numerous train, 380
Followed, in sable pomp, and wept amain,
As sad Polyxena her pall had rent,
And wild Cassandra raised the loud lament:
Had he but fallen, ere his adulterous boy
Spread his bold sails, and left the shores of Troy. 385
But what did lengthened life avail the sire?
To see his realm laid waste by sword and fire.
Then too, too late, the feeble soldier tried
Unequal arms, and flung his crown aside;
Tottered, his children's murderer to repel, 390
With trembling haste, and at Jove's altar fell,
Fell without effort; like the steer, that, now,
Time-worn and weak, and, by the ungrateful plow,
Spurned forth to slaughter, to the master's knife
Yields his shrunk veins and miserable life. 395
His end, howe'er, was human; while his mate,
Doomed, in a brute, to drain the dregs of fate,
Pursued the foes of Troy from shore to shore,
And barked and howled at those she cursed before.
I pass, while hastening to the Roman page, 400
The Pontic king, and Crœsus, whom the Sage
Wisely forbade in fortune to confide,
Or take the name of HAPPY, till he died.
That Marius, exiled from his native plains,
Was hid in fens, discovered, bound in chains; 405
That, bursting these, to Africa he fled,
And, through the realms he conquered, begged his bread,
Arose from age, from treacherous age alone:
For what had Rome, or earth, so happy known,
Had he, in that bless'd moment, ceased to live, 410
When, graced with all that Victory could give,
"Pride, pomp, and circumstance of glorious war,"
He first alighted from his Cimbrian car!
Campania, prescient of her Pompey's fate,
Send a kind fever to arrest his date: 415
When lo! a thousand suppliant altars rise,
And public prayers obtain him of the skies.
Ill done! that head, thus rescued from the grave,
His Evil Fate and ours, by Nilus' wave,
Lopp'd from the trunk:—such mutilation dire} 420
Cornelius 'scaped; Cethegus fell entire;}
And Catiline pressed, whole, the funeral pyre.}
Whene'er the fane of Venus meets her eye,
The anxious mother breathes a secret sigh
For handsome boys; but asks, with bolder prayer, 425
That all her girls be exquisitely fair!
"And wherefore not? Latona, in the sight
Of Dian's beauty, took unblamed delight."
True; but Lucretia cursed her fatal charms,
When spent with struggling in a Tarquin's arms; 430
And poor Virginia would have changed her grace
For Rutila's crooked back and homely face.
"But boys may still be fair?" No; they destroy
Their parents' peace, and murder all their joy;
For rarely do we meet, in one combined, 435
A beauteous body and a virtuous mind,
Though, through the rugged line, there still has run
A Sabine sanctity, from sire to son.—
Besides, should Nature, in her kindest mood,
Confer the ingenuous flush of modest blood, 440
The disposition chaste as unsunned snow—
(And what can Nature more than these bestow,
These, which no art, no care can give)?—even then,
They can not hope, they must not, to be men!
Smit with their charms, the imps of hell appear, 445
And pour their proffers in a parent's ear,
For prostitution!—infamously bold,
And trusting to the almighty power of gold:
While youths in shape and air less formed to please
No tyrants mutilate, no Neros seize. 450
Go now, and triumph in your beauteous boy,
Your Ganymede! whom other ills annoy,
And other dangers wait: his graces known,
He stands professed, the favorite of the town;
And dreads, incessant dreads, on every hand, 455
The vengeance which a husband's wrongs demand:
For sure detection follows soon or late;
Born under Mars, he can not scape his fate.
Oft on the adulterer, too, the furious spouse
Inflicts worse evils than the law allows; 460
By blows, stripes, gashes some are robbed of breath
And others, by the mullet, racked to death.
"But my Endymion will more lucky prove,
And serve a beauteous mistress, all for love."
No; he will soon to ugliness be sold, 465
And serve a toothless grandam, all for gold.
Servilia will not lose him; jewels, clothes,
All, all she sells, and all on him bestows;
For women naught to the dear youth deny,
Or think his labors can be bought too high: 470
When love's the word, the naked sex appear,
And every niggard is a spendthrift here.
"But if my boy with virtue be endued,
What harm will beauty do him?" Nay, what good?
Say, what availed, of old, to Theseus' son, 475
The stern resolve? what to Bellerophon?—
O, then did Phædra redden, then her pride
Took fire, to be so steadfastly denied!
Then, too, did Sthenobœa glow with shame,
And both burst forth with unextinguished flame! 480
A woman scorned is pitiless as fate,
For, there, the dread of shame adds stings to hate.
But Silius comes.—Now, be thy judgment tried:
Shall he accept, or not, the proffered bride,
And marry Cæsar's wife? hard point, in truth: 485
Lo! this most noble, this most beauteous youth,
Is hurried off, a helpless sacrifice
To the lewd glance of Messalina's eyes!
—Haste, bring the victim: in the nuptial vest
Already see the impatient Empress dress'd; 490
The genial couch prepared, the accustomed sum
Told out, the augurs and the notaries come.
"But why all these?" You think, perhaps, the rite
Were better, known to few, and kept from sight;
Not so the lady; she abhors a flaw, 495
And wisely calls for every form of law.
But what shall Silius do? refuse to wed?
A moment sees him numbered with the dead.
Consent, and gratify the eager dame?
He gains a respite, till the tale of shame, 500
Through town and country, reach the Emperor's ear,
Still sure the last—his own disgrace to hear.
Then let him, if a day's precarious life
Be worth his study, make the fair his wife;
For wed or not, poor youth, 'tis still the same, 505
And still the axe must mangle that fine frame!
Say then, shall man, deprived all power of choice,
Ne'er raise to heaven the supplicating voice?
Not so; but to the gods his fortunes trust:
Their thoughts are wise, their dispensations just. 510
What best may profit or delight they know,
And real good for fancied bliss bestow:
With eyes of pity they our frailties scan;
More dear to them, than to himself, is man.
By blind desire, by headlong passion driven, 515
For wife and heirs we daily weary Heaven:
Yet still 'tis Heaven's prerogative to know,
If heirs, or wife, will bring us weal or woe.
But (for 'tis good our humble hope to prove),
That thou may'st, still, ask something from above, 520
Thy pious offerings to the temple bear,
And, while the altars blaze, be this thy prayer.
O THOU, who know'st the wants of human kind,
Vouchsafe me health of body, health of mind;
A soul prepared to meet the frowns of fate, 525
And look undaunted on a future state;
That reckons death a blessing, yet can bear
Existence nobly, with its weight of care;
That anger and desire alike restrains,
And counts Alcides' toils, and cruel pains, 530
Superior far to banquets, wanton nights,
And all the Assyrian monarch's soft delights!
Here bound, at length, thy wishes. I but teach
What blessings man, by his own powers, may reach.
The path to peace is virtue. We should see, 535
If wise, O Fortune, naught divine in thee:
But we have deified a name alone,
And fixed in heaven thy visionary throne!
SATIRE XI.
TO PERSICUS.
If Atticus in sumptuous fare delight,
'Tis taste: if Rutilus, 'tis madness quite:
And what diverts the sneering rabble more
Than an Apicius miserably poor?
In every company, go where you will, 5
Bath, forum, theatre, the talk is still
Of Rutilus!—While fit (they cry) to wield,
With firm and vigorous arm, the spear and shield,
While his full veins beat high with youthful blood,
Forced by no tribune—yet by none withstood, 10
He cultivates the gladiator's trade,
And learns the imperious language of the blade.
What swarms we see of this degenerate kind!
Swarms whom their creditors can only find
At flesh and fish-stalls:—thither they repair, 15
Sure, though deceived at home, to catch them there.
These live but for their palate; and, of these,
The most distressed (while Ruin hastes to seize
The crumbling mansion and disparting wall),
Spread richer feasts, and riot as they fall!— 20
Meanwhile, ere yet the last supply be spent,
They search for dainties every element,
Awed by no price; nay, making this their boast,
And still preferring that which costs them most,
Joyous, and reckless of to-morrow's fate, 25
To raise a desperate sum, they pledge their plate,
Or mother's fractured image; to prepare
Yet one treat more, though but in earthen ware!
Then to the fencer's mess they come, of course,
And mount the scaffold as a last resource. 30
No foe to sumptuous boards, I only scan,
When such are spread, the motives, and the man,
And praise or censure, as I see the feast
Or by the noble or the beggar dress'd:
In this, 'tis gluttony; in that, fit pride, 35
Sanctioned by wealth, by station dignified.—
Whip me the fool, who marks how Atlas soars
O'er every hill on Mauritania's shores,
Yet sees no difference 'twixt the coffer's hoards,
And the poor pittance a small purse affords! 40
Heaven sent us "KNOW THYSELF!"—Be this impress'd
In living characters, upon thy breast,
And still revolved; whether a wife thou choose,
Or to the SACRED SENATE point thy views.—
Or seek'st thou rather, in some doubtful cause, 45
To vindicate thy country's injured laws?
Knock at thy bosom, play the censor's part,
And note with caution what and who thou art,
An orator of force and skill profound,
Or a mere Matho, emptiness and sound! 50
Yes, KNOW THYSELF: in great concerns, in small,
Be this thy care, for this, my friend, is all:
Nor, when thy purse will scarce a gudgeon buy,
With fond intemperance for turbots sigh!
O think what end awaits thee, timely think, 55
If thy throat widens as thy pockets shrink,
Thy throat, of all thy father's thrift could save,
Flocks, herds, and fields, the insatiable grave!—
At length, when naught remains a meal to bring,
The last poor shift, off comes the knightly ring, 60
And "sad Sir Pollio" begs his daily fare,
With undistinguished hands, and finger bare!
To these, an early grave no terror brings,
"A short and merry life!" the spendthrift sings;
Death seems to him a refuge from despair, 65
And far less terrible than hoary hair.
Mark now the progress of their rapid fate!
Money (regardless of the monthly rate),
On every side, they borrow, and apace,
Waste what is borrowed before the lender's face: 70
Then, while they yet some wretched remnant hold,
And the pale usurer trembles for his gold,
They wisely sicken for the country air,
And flock to Baiæ, Ostia, Jove knows where.—
For now 'tis held (so rife the evil's grown) 75
No greater shame, for debt, to flee the town,
Than from the thronged Suburra to remove,
In dog-days, to the Esquilian shades above.
One thought alone, what time they leave behind
Friends, country, all, weighs heavy on their mind, 80
One thought alone—for twelve long months to lose
The dear delights of Rome, the public shows!
Where sleeps the modest blood! In all our veins,
No conscious drop, to form a blush, remains:
Shame, from the town, derided, speeds her way, 85
And few, alas! solicit her to stay.
Enough: to-day my Persicus shall see
Whether my precepts with my life agree;
Whether, with feigned austerity, I prize
The spare repast, a glutton in disguise! 90
Bawl for coarse pottage, that my friends may hear,
But whisper "sweetmeats!" in my servant's ear.
For since, by promise, you are now my guest,
Know, I invite you to no sumptuous feast,
But to such simple fare, as long, long since, 95
The good Evander bade the Trojan prince.
Come then, my friend, you will not, sure, despise
The food that pleased the offspring of the skies;
Come, and while fancy brings past times to view,
I'll think myself the king, the hero you. 100
Take now your bill of fare: my simple board
Is with no dainties from the market stored,
But dishes all my own. From Tibur's stock
A kid shall come, the fattest of the flock,
The tenderest too, and yet too young to browse 105
The thistle's shoots, the willow's watery boughs,
With more of milk than blood; and pullets dress'd
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com