0% found this document useful (0 votes)
12 views

Algorithmic Trading Essentials Python Integration For The Modern Trader Publishing pdf download

The document discusses 'Algorithmic Trading Essentials: Python Integration for the Modern Trader,' which aims to simplify the complexities of algorithmic trading using Python. It highlights the evolution of trading from manual processes to sophisticated algorithms, emphasizing the benefits of speed, efficiency, and reduced human error. The book serves as a guide for aspiring traders and investors to navigate the world of algorithmic trading while addressing ethical considerations and the importance of regulatory compliance.

Uploaded by

ilzobrzan47
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Algorithmic Trading Essentials Python Integration For The Modern Trader Publishing pdf download

The document discusses 'Algorithmic Trading Essentials: Python Integration for the Modern Trader,' which aims to simplify the complexities of algorithmic trading using Python. It highlights the evolution of trading from manual processes to sophisticated algorithms, emphasizing the benefits of speed, efficiency, and reduced human error. The book serves as a guide for aspiring traders and investors to navigate the world of algorithmic trading while addressing ethical considerations and the importance of regulatory compliance.

Uploaded by

ilzobrzan47
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 79

Algorithmic Trading Essentials Python

Integration For The Modern Trader Publishing


download

https://ebookbell.com/product/algorithmic-trading-essentials-
python-integration-for-the-modern-trader-publishing-58303512

Explore and download more ebooks at ebookbell.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Algorithmic Essentials Trading With Python Your Comprehenive Guide For


2024 Van Der Post

https://ebookbell.com/product/algorithmic-essentials-trading-with-
python-your-comprehenive-guide-for-2024-van-der-post-55138060

Algorithmic Trading Winning Strategies And Their Rationale 1st Edition


Chan

https://ebookbell.com/product/algorithmic-trading-winning-strategies-
and-their-rationale-1st-edition-chan-55259236

Algorithmic Trading Systems Advanced Gap Strategies For The Futures


Markets David Bean

https://ebookbell.com/product/algorithmic-trading-systems-advanced-
gap-strategies-for-the-futures-markets-david-bean-55729524

Algorithmic Trading Pro Options Trading With Python Learn To Trade


Like A Snake Van Der Post

https://ebookbell.com/product/algorithmic-trading-pro-options-trading-
with-python-learn-to-trade-like-a-snake-van-der-post-56796436
Algorithmic Trading Systems And Strategies A New Approach Design Build
And Maintain 1st Edition Viktoria Dolzhenko

https://ebookbell.com/product/algorithmic-trading-systems-and-
strategies-a-new-approach-design-build-and-maintain-1st-edition-
viktoria-dolzhenko-58302764

Algorithmic Trading And Dma An Introduction To Direct Access Trading


Strategies Barry Johnson

https://ebookbell.com/product/algorithmic-trading-and-dma-an-
introduction-to-direct-access-trading-strategies-barry-johnson-4071972

Algorithmic Trading A Practitioners Guide Jeffrey Bacidore

https://ebookbell.com/product/algorithmic-trading-a-practitioners-
guide-jeffrey-bacidore-50995010

Algorithmic Trading Methods Applications Using Advanced Statistics


Optimization And Machine Learning Techniques 2nd Edition Robert
Kissell

https://ebookbell.com/product/algorithmic-trading-methods-
applications-using-advanced-statistics-optimization-and-machine-
learning-techniques-2nd-edition-robert-kissell-14222718

Algorithmic Trading And Quantitative Strategies 1st Edition Raja Velu

https://ebookbell.com/product/algorithmic-trading-and-quantitative-
strategies-1st-edition-raja-velu-16313960
ALGORITHMIC
TRADING ESSENTIALS
Python Integration for the Modern Trader

Hayden Van Der Post

Reactive Publishing
© 2024 Reactive Publishing. All rights reserved. No part of this
publication may be reproduced, distributed, or transmitted in any
form or by any means, including photocopying, recording, or other
electronic or mechanical methods, without the prior written
permission of the publisher, except in the case of brief quotations
embodied in critical reviews and certain other noncommercial uses
permitted by copyright law.
This book is intended to provide accurate and authoritative
information in regard to the subject matter covered. It is sold with
the understanding that the publisher is not engaged in rendering
legal, accounting, or other professional services. If legal advice or
other professional assistance is required, the services of a competent
professional should be sought.
All trademarks, product names, company names, and logos
mentioned herein are the property of their respective owners and
used for identification purposes only. ```
PREFACE

I
n an era where financial markets move at the speed of light and
human traders struggle to keep pace, the quest for an edge has
led us to embrace algorithms—formidable entities capable of
parsing massive datasets, executing trades in microseconds, and
making decisions with precision that mere mortals could only dream
of. Welcome to "Algorithmic Trading Essentials: Python Integration
for the Modern Trader," a compendium designed to be your compass
as you navigate the intricate world of algorithmic trading.
When I first ventured into the realm of algorithmic trading, I was
gripped by a sense of awe and possibility. The ability to transform
raw data into actionable insights, to leverage computational power
for a more disciplined and strategic approach to trading, felt like
modern alchemy. Yet, I also encountered the seemingly
impenetrable wall of jargon, technical requirements, and the steep
learning curve that often dissuade even the most enthusiastic
novices. This book is born from the idea of lowering that wall,
streamlining complexities, and guiding you to harness the power of
algorithmic trading with the versatile and accessible language of
Python.
This book is more than just a technical manual; it is an invitation to
the enchanted yet data-driven world of algorithmic trading. Each
chapter is designed not only to educate but to inspire, empowering
you to transform knowledge into insight and ultimately into trading
success. Whether you are an aspiring trader, a seasoned investor, or
a tech enthusiast, "Algorithmic Trading Essentials: Python
Integration for the Modern Trader" is your steadfast companion on
this exhilarating journey.
Welcome aboard, and may your algorithms be ever in your favor.
CHAPTER 1:
INTRODUCTION TO
ALGORITHMIC TRADING

I
mage a dimly lit room filled with the soft hum of high-speed
servers and the rhythmic clicking of mechanical keyboards. It’s
early morning in Vancouver, and the financial markets are just
awakening. In this room, traders and quantitative analysts like Mark,
a senior quant at a leading hedge fund, are meticulously crafting
algorithms to take advantage of the day's trading opportunities. This
is the world of algorithmic trading.
Algorithmic trading, or "algo trading", involves the use of computer
programs and algorithms to trade financial securities at speeds and
frequencies that surpass human capabilities. it harnesses the power
of computational algorithms to automate trading decisions,
executing orders based on predefined criteria such as timing, price,
and volume.
The Evolution of Trading
The journey of algorithmic trading begins with the humble origins of
financial markets, a place where trading was done through face-to-
face interactions and handwritten ledgers. Fast forward to the late
20th century, when digitization began revolutionizing this space. It
was during the 1970s and 1980s that the advent of electronic
trading platforms and the increasing computational power led to the
birth of algorithmic trading. Early adopters garnered significant
advantages, leveraging technology to reduce latency and increase
precision in their trades.
Mark's Journey in Algorithmic Trading
Take Mark, for example. He began his career amidst this
technological revolution, armed with a deep understanding of
financial markets and a knack for coding. His early days were spent
manually analyzing charts and news, but he saw the potential in
automating these processes. The first algorithm he developed was a
simple moving average crossover strategy, coded in Python. This
algorithm, though rudimentary by today's standards, allowed him to
execute trades based on predefined moving average crossovers
automatically. The success of his early ventures spurred him to dive
deeper into more complex strategies and technologies.
Why Go Algorithmic?
So, why should one consider algorithmic trading? Firstly, algorithms
can process vast amounts of data at lightning speed, allowing for
more informed and timely trading decisions. They can operate
around the clock, tirelessly executing trades based on signals that
humans might miss. Furthermore, algorithms eliminate the
emotional bias that often plagues human traders, adhering strictly to
logic and predefined rules.
To illustrate, imagine an algorithm designed to trade stocks based on
sentiment analysis from social media platforms. This algorithm scans
millions of tweets and posts, extracting sentiment data and
correlating it with stock movements. It can execute trades within
milliseconds of detecting a trend, something no human could
accomplish.
The Intersection of Technology and Finance
Algorithmic trading sits at the crossroads of finance and technology.
It requires understanding not only market dynamics but also the
intricacies of programming and data analysis. Languages like Python,
R, and C++ become essential tools for traders and quants, enabling
them to create algorithms that can adapt to evolving market
conditions.
The technological backbone of algo trading includes high-speed
internet, powerful servers, and sophisticated trading platforms.
These components ensure that algorithms can execute trades with
minimal latency, a crucial factor in maintaining a competitive edge.
Ethics and Regulation
As with any powerful tool, algorithmic trading comes with its own set
of challenges and ethical considerations. Flash crashes, where
markets plummet in seconds due to automated trading, highlight the
potential risks. Therefore, regulators around the world have enacted
rules to ensure the stability and fairness of markets. Traders must
remain vigilant, ensuring their algorithms comply with these
regulations and do not contribute to market volatility.
Mark's Ethical Dilemma
Consider Mark again, who, after years of successful algo trading,
faced an ethical dilemma. One of his newer algorithms, designed to
capitalize on market inefficiencies, began exerting a noticeable
impact on smaller stock prices. Realizing the potential market
disruption, Mark had to revisit his algorithm to ensure it traded
responsibly, balancing profitability with ethical considerations.
Skills and Tools
Becoming proficient in algorithmic trading requires a diverse skillset.
A strong foundation in mathematics, statistics, and financial theory is
essential. Additionally, proficiency in programming languages,
particularly Python, is crucial for developing trading algorithms. Tools
like Jupyter Notebooks, NumPy, and Pandas become invaluable
resources in the trader's toolkit.
Setting Up for Success
For those new to this field, setting up a development environment is
the first step. This includes installing Python, setting up an IDE
(Integrated Development Environment), and familiarizing oneself
with key libraries used in data analysis and algorithm development.
Beginners might start with simpler strategies, gradually progressing
to more complex models as they gain experience.
Algorithmic trading is more than just a buzzword—it's a paradigm
shift in how financial markets operate, blending the precision of
computer algorithms with the complexity of human strategy. It
invites traders to explore the vast potential of technology, enabling
them to execute trades with unparalleled speed and accuracy. As
you embark on this journey, remember the story of Mark and the
countless other traders who have walked this path, continuously
innovating and pushing the boundaries of what is possible in the
world of finance.

History and Evolution


Imagine standing at the floor of the New York Stock Exchange in
the early 20th century. Traders are shouting orders, phones are
ringing incessantly, and chalkboards are being hastily updated with
the latest prices. This frenetic scene is a far cry from today's world
of automated trading, yet it lays the foundation for the journey that
algorithmic trading has undertaken over the past century.
The Beginnings: A Manual Affair
Initially, trading was an entirely manual process. Brokers would
receive orders via telephone or in person and then physically relay
these orders to the exchange floor. This process was time-consuming
and fraught with the potential for human error. However, it laid the
groundwork for a complex financial system where opportunities and
risks were omnipresent.
Technological Pioneers: The Advent of Electronic Trading
The 1970s and 1980s marked the dawn of electronic trading, a
pivotal shift fueled by advancements in computing and
telecommunications. The introduction of Nasdaq in 1971, the world's
first electronic stock market, was a seminal event. Nasdaq's platform
allowed traders to execute orders electronically, reducing the need
for physical presence on the trading floor and minimizing latency.
In 1976, the New York Stock Exchange introduced the Designated
Order Turnaround (DOT) system, which allowed brokers to send
orders electronically to the exchange floor. This period also saw the
rise of other electronic communication networks (ECNs), facilitating
direct trading between buyers and sellers without intermediaries.
Birth of Algorithmic Trading: From Theory to Practice
The term "algorithmic trading" began gaining prominence in the
1980s and 1990s. Initially, algorithms were simple, executing trades
based on basic conditions like moving averages or trade volume.
Academics and practitioners began to realize the potential of
quantitative methods in trading, inspired by the efficient market
hypothesis and the burgeoning field of quantitative finance.
The Quants: Renaissance of Financial Engineering
The turn of the century saw the rise of "Quants" — financial
engineers who specialized in creating sophisticated mathematical
models for trading. These quants leveraged advanced statistical
methods and computational power to devise intricate trading
strategies. Hedge funds like Renaissance Technologies, founded by
James Simons, were at the forefront of this revolution, employing
PhDs in physics, mathematics, and computer science to develop
cutting-edge algorithms.
Regulatory and Ethical Considerations: Setting Boundaries
With the rise of high-frequency trading (HFT) in the mid-2000s,
algorithmic trading evolved into an even more sophisticated realm.
HFT firms deploy algorithms capable of executing millions of trades
per second, capitalizing on minute price discrepancies. However, this
rapid evolution also led to increased scrutiny from regulators.
Events like the 2010 "Flash Crash," where the Dow Jones Industrial
Average plummeted nearly 1,000 points in minutes before
rebounding, highlighted the risks associated with algorithmic trading.
The Flash Crash brought to light the need for robust regulatory
frameworks. Agencies like the U.S. Securities and Exchange
Commission (SEC) and the Commodity Futures Trading Commission
(CFTC) began implementing rules to curb excessive risk and ensure
market stability.
Mark's Insight into Regulation
Reflect on Mark's experience as a quant. After witnessing firsthand
the impact of regulatory changes, he realized the importance of
building compliance into his algorithms.
The Present and Future: AI and Beyond
Today, the integration of artificial intelligence (AI) and machine
learning into algorithmic trading is pushing the boundaries even
further. AI-driven algorithms can process massive datasets, identify
patterns, and adapt to market changes in real-time. Firms are
increasingly investing in AI to gain a competitive edge, employing
natural language processing (NLP) to analyze news and sentiment,
and reinforcement learning to optimize trading strategies.
The Role of Quantum Computing
The horizon of algorithmic trading is set to expand even further with
the advent of quantum computing. Quantum algorithms promise to
solve complex optimization problems much faster than traditional
computers, offering unprecedented opportunities for traders.
Researchers and practitioners are exploring the potential of quantum
computing to revolutionize trading strategies and risk management.
The evolution of algorithmic trading is a testament to the relentless
pursuit of efficiency and innovation in financial markets. From the
manual processes of the early 20th century to the sophisticated AI-
driven algorithms of today, each milestone represents a leap forward
in technology and strategy. As traders and quants like Mark continue
to push the envelope, the future of algorithmic trading promises to
be even more dynamic and exciting.
In the following section, we will explore the myriad benefits of
algorithmic trading, delving into how these advanced techniques can
enhance trading performance, reduce costs, and offer unparalleled
opportunities for innovation.

Benefits of Algorithmic Trading


Efficiency and Speed: The Heart of Algorithmic Trading
One of the most significant advantages of algorithmic trading is the
remarkable efficiency and speed it offers. Human traders can only
process and act on a finite amount of information, but algorithms,
executing trades in microseconds, enable a level of speed and
precision unattainable by manual methods. This rapid execution
minimizes latency, allowing traders to capitalize on fleeting market
opportunities that would otherwise be missed. For John, this meant
his algorithms could react to market movements almost
instantaneously, giving him an edge over competitors still reliant on
manual processes.
Eliminating Human Error: Precision and Consistency
Every trader has experienced the sting of human error—a
miscalculated trade, a moment of indecision, or the emotional
turmoil clouding judgment. Algorithmic trading mitigates these risks
by enforcing discipline and consistency. Algorithms operate based on
predefined rules and conditions, ensuring that every trade aligns
with a meticulously crafted strategy. This removes the emotional
component from trading, leaving no room for impulsive decisions
driven by fear or greed. For John, knowing that his algorithms
executed trades with unwavering precision provided peace of mind
and a higher degree of reliability.
Cost Reduction: Operational and Transactional Savings
Algorithmic trading also brings about considerable cost reductions,
both operationally and transactionally. Additionally, algorithmic
trading often results in better execution prices due to optimal timing
and placement of trades, reducing slippage and transaction costs.
John's firm benefitted from this efficiency by reallocating resources
towards more strategic roles, ultimately enhancing overall
productivity and profitability.
Diversification and Access to Multiple Markets: Expanding
Horizons
Another profound benefit of algorithmic trading is the ability to
diversify and access multiple markets simultaneously. Algorithms can
be programmed to trade across different asset classes, markets, and
time zones without the limitations faced by human traders. This
diversification reduces risk and enhances the potential for returns.
John’s algorithms, for instance, allowed him to simultaneously trade
equities in North America, forex in Europe, and commodities in Asia
—all while he enjoyed a leisurely breakfast at a local café in
Vancouver.
Enhanced Backtesting and Strategy Optimization: Data-
Driven Decisions
Backtesting is a critical component of strategy development in
algorithmic trading. This data-driven approach enables continuous
refinement and optimization of trading strategies, making them more
resilient to market changes. John spent countless hours backtesting
his algorithms, using Python libraries such as Zipline and
PyAlgoTrade to ensure his strategies were not only theoretically
sound but practically viable.
Scalability: Trading at Scale with Ease
Scalability is another inherent advantage of algorithmic trading.
Unlike manual trading, algorithms can handle an immense volume of
transactions effortlessly, scaling operations without a proportional
increase in effort or resources. This makes it feasible to implement
high-frequency trading strategies, which involve executing a large
number of trades in quick succession to capitalize on minute price
differentials. For John, this meant his trading operations could grow
exponentially without being bogged down by the limitations of
manual processing.
Transparency and Auditability: Ensuring Compliance
In an era where regulatory scrutiny is ever-increasing, transparency
and auditability have become paramount. Algorithmic trading
provides a high level of transparency as every trade executed by an
algorithm is recorded and can be audited. This traceability ensures
compliance with regulatory requirements, facilitating easier reporting
and investigation in case of discrepancies. John’s firm adopted
comprehensive logging and monitoring systems, ensuring that every
algorithmic decision could be traced back and reviewed, thereby
maintaining a high standard of regulatory compliance.
Risk Management: Tailored and Responsive
Effective risk management is crucial in trading, and algorithms offer
sophisticated tools to manage risk. Algorithms can incorporate
complex risk management rules, such as stop-loss orders, position
sizing, and portfolio rebalancing, to mitigate potential losses. They
can also adapt to changing market conditions in real-time, adjusting
strategies to minimize exposure. John’s algorithms were equipped
with advanced risk management protocols, allowing him to trade
with confidence, knowing that his downside risks were well-
contained.
Accessibility and Democratization: Leveling the Playing Field
In the past, algorithmic trading was the domain of large financial
institutions with substantial resources. However, advancements in
technology and the proliferation of open-source tools have
democratized algorithmic trading, making it accessible to individual
traders and smaller firms. Platforms like QuantConnect and services
like Interactive Brokers provide the infrastructure needed to develop
and deploy trading algorithms, leveling the playing field. John
started his journey with a modest setup, leveraging these platforms
to refine his skills and eventually build a successful trading
operation.
Environmental Impact: A Greener Approach
Interestingly, algorithmic trading can also have a positive
environmental impact. The shift towards cloud-based trading
systems further contributes to this environmental benefit, as data
centers optimize energy use more efficiently than traditional setups.
For John, this meant contributing to a more sustainable world while
pursuing his professional ambitions.
The benefits of algorithmic trading are manifold and transformative.
From efficiency and cost reduction to enhanced risk management
and democratization, algorithmic trading has reshaped the financial
landscape. For traders like John, these advantages translate into
tangible gains, enabling them to navigate the markets with
precision, confidence, and a competitive edge. As you embark on
your journey in algorithmic trading, embracing these benefits will be
crucial for achieving success and staying ahead in a rapidly evolving
industry.
In the forthcoming section, we will dive into the key concepts and
terminology essential to understanding and mastering algorithmic
trading. This foundational knowledge will equip you with the
vocabulary and insights needed to navigate the complexities of
financial markets and trading strategies.

Key Concepts and Terminology


It was a chilly morning in Vancouver as Emma, a diligent finance
enthusiast, sat at her favorite café, sipping a hot cup of coffee. The
aroma of freshly brewed coffee mingled with the invigorating scent
of possibility. Emma had always been fascinated by the financial
markets and was eager to dive deeper into the world of algorithmic
trading. As she opened her laptop to continue her studies, she knew
that mastering the key concepts and terminology would be her first
significant step towards becoming proficient in this field.
Algorithm: an algorithm is a set of rules or instructions designed to
perform a specific task. In the context of trading, algorithms are
used to automate the process of buying and selling financial
instruments based on predetermined criteria. Imagine a well-
choreographed dance where each step is meticulously planned out in
advance—this is akin to how a trading algorithm operates, executing
trades swiftly and efficiently.
Backtesting: Before deploying a trading strategy in live markets,
traders need to test its viability using historical data. This process,
known as backtesting, allows traders to see how their strategies
would have performed in the past, helping them refine and optimize
their algorithms. Emma found backtesting particularly fascinating as
it felt like a valuable dress rehearsal before stepping onto the grand
stage of live trading.
Execution: In algorithmic trading, execution refers to the actual
process of completing a trade. It involves sending buy or sell orders
to the market. High-frequency trading (HFT) firms, for instance,
might execute thousands of trades in a fraction of a second,
showcasing the algorithm's ability to perform at lightning speed.
Execution is where the rubber meets the road, transforming
theoretical strategies into actionable trades.
Latency: Latency is the time it takes for data to travel between its
source and its destination. In trading, lower latency is crucial as it
allows algorithms to react more quickly to market changes. Emma
likened latency to a race where every millisecond counts—those who
are faster gain the upper hand.
Liquidity: Liquidity refers to the ease with which an asset can be
bought or sold in the market without affecting its price. High liquidity
implies that there are many buyers and sellers, making it easier to
execute large trades without causing significant price fluctuations.
Emma found that understanding liquidity was essential for
developing strategies that could be executed smoothly and
efficiently.
Market Order: A market order is an order to buy or sell a security
immediately at the best available current price. While market orders
guarantee execution, they do not guarantee a specific price. For
Emma, market orders represented a straightforward but sometimes
costly way to ensure trades were executed promptly.
Limit Order: Unlike a market order, a limit order sets the maximum
or minimum price at which you are willing to buy or sell a security.
Limit orders provide more control over the execution price but do
not guarantee that the order will be filled. Emma appreciated limit
orders for their ability to shield her from unfavorable price
movements.
Slippage: Slippage occurs when there is a difference between the
expected price of a trade and the actual price at which it is
executed. It is often a result of market volatility or latency. Emma
realized that minimizing slippage was paramount to maintaining the
profitability of her trading strategies.
Spread: The spread is the difference between the bid price and the
ask price of a security. It represents the transaction cost of trading
and can significantly impact profitability. Emma learned to keep a
keen eye on spreads, aiming to trade instruments with tighter
spreads to maximize her returns.
Order Book: The order book is a real-time list of buy and sell
orders for a specific security. It provides insight into the supply and
demand dynamics of the market.
Arbitrage: Arbitrage involves taking advantage of price
discrepancies between different markets or instruments to make a
profit. In algorithmic trading, arbitrage strategies can be highly
lucrative but require sophisticated algorithms to identify and act on
these fleeting opportunities. Emma was captivated by the intricate
dance of arbitrage, seeing it as a puzzle with constantly shifting
pieces.
Alpha: Alpha measures a strategy's performance relative to a
benchmark index. It represents the excess return generated by a
strategy over and above the market's return. For Emma, generating
alpha was the ultimate goal, signaling her ability to outperform the
market through her acumen and strategic prowess.
Beta: Beta measures the volatility of a security or portfolio relative
to the overall market. A beta greater than one indicates higher
volatility, while a beta less than one suggests lower volatility.
Understanding beta helped Emma manage her risk exposure and
align her strategies with her risk tolerance.
Sharpe Ratio: The Sharpe Ratio is a metric used to evaluate the
risk-adjusted return of a strategy. It compares the excess return of a
strategy to its standard deviation, providing insight into its efficiency.
Emma found the Sharpe Ratio to be an invaluable tool for assessing
the quality of her trading algorithms.
Drawdown: Drawdown refers to the peak-to-trough decline during
a specific period for an investment or trading strategy. Managing
drawdown is crucial for maintaining capital and ensuring long-term
success. Emma understood that minimizing drawdown was key to
preserving her trading capital and gaining investor confidence.
Event-Driven Strategy: Event-driven strategies are based on the
occurrence of specific events, such as earnings announcements,
mergers, or economic reports. These strategies capitalize on the
market's reaction to these events. Emma enjoyed the dynamic
nature of event-driven strategies, finding them both challenging and
rewarding.
Machine Learning: Machine learning involves using statistical
techniques to enable algorithms to learn from data and improve their
performance over time. In trading, machine learning models can
help predict market movements and optimize strategies. Emma was
excited about the potential of machine learning to revolutionize her
trading approach.
Reinforcement Learning: A subset of machine learning,
reinforcement learning focuses on training algorithms to make
sequences of decisions by rewarding positive outcomes and
penalizing negative ones. Reinforcement learning holds great
promise for developing adaptive and autonomous trading systems.
Emma envisioned a future where her algorithms could learn and
evolve on their own, becoming ever more sophisticated.
Python Libraries: Python, being the language of choice for
algorithmic trading, offers numerous libraries to support trading
activities. Libraries such as NumPy for numerical computing, Pandas
for data manipulation, Matplotlib for visualization, and Scikit-learn for
machine learning are indispensable tools in a trader's toolkit. Emma
spent countless hours familiarizing herself with these libraries,
transforming raw data into actionable insights.
High-Frequency Trading (HFT): HFT involves executing a large
number of orders at extremely high speeds. High-frequency traders
capitalize on small price differentials and require highly sophisticated
algorithms and low-latency infrastructure. Emma viewed HFT as the
Formula 1 of trading, where performance, precision, and speed were
paramount.
As the sun set over the city of Vancouver, Emma closed her laptop,
feeling a sense of accomplishment and exhilaration. She had taken a
significant step in her journey towards mastering algorithmic trading
by familiarizing herself with these fundamental concepts and
terminologies. With each new term she mastered, she felt more
equipped to navigate the complex and exciting world of algorithmic
trading. This foundational knowledge would not only inform her
strategies but also serve as a solid bedrock upon which she could
build her expertise.

Types of Algorithmic Trading


Strategies
As the first rays of dawn pierced through the misty skyline of
Vancouver, Emma's alarm clock buzzed quietly. She had a busy day
ahead, and her mind was already racing with thoughts of algorithmic
trading strategies. Inspired by her recent deep dive into key
concepts and terminology, she was eager to explore the diverse
types of strategies that traders employ to gain an edge in the
market. Each strategy, she knew, was a unique blend of art and
science, requiring both analytical rigor and creative insight.
1. Trend-Following Strategies
Trend-following strategies, as the name suggests, are designed to
capitalize on the momentum of market trends. These strategies
assume that once a trend is established, it is likely to continue.
Emma likened trend-following to surfing—catching a wave at the
right time and riding it until it dissipates.
Typically, trend-following strategies involve technical indicators such
as moving averages, which help identify the direction and strength
of a trend. For instance, a simple moving average crossover strategy
might generate buy signals when a short-term moving average
crosses above a long-term moving average, and sell signals when
the reverse occurs.
Example:
```python import pandas as pd import numpy as np
\# Load historical price data
data = pd.read_csv('historical_prices.csv', index_col='Date', parse_dates=True)

\# Calculate short-term and long-term moving averages


data['SMA_50'] = data['Close'].rolling(window=50).mean()
data['SMA_200'] = data['Close'].rolling(window=200).mean()

\# Generate trading signals


data['Signal'] = 0
data['Signal'][50:] = np.where(data['SMA_50'][50:] > data['SMA_200'][50:], 1, -1)

\# Calculate returns
data['Returns'] = data['Close'].pct_change()
data['Strategy_Returns'] = data['Returns'] * data['Signal'].shift(1)

\# Plot results
import matplotlib.pyplot as plt

plt.figure(figsize=(12, 6))
data[['Close', 'SMA_50', 'SMA_200']].plot()
plt.show()
```
In this example, Emma sees how a simple trend-following strategy
can be implemented in Python using moving averages. The goal is to
capture trends and ride them for as long as they persist.
2. Mean Reversion Strategies
Mean reversion strategies are based on the assumption that asset
prices tend to revert to their historical mean or average over time.
When prices deviate significantly from their mean, mean reversion
strategies anticipate a correction.
Emma found mean reversion akin to a pendulum—when it swings
too far in one direction, it eventually swings back. Common
indicators for mean reversion include Bollinger Bands and Relative
Strength Index (RSI).
Example:
```python # Calculate Bollinger Bands data['MA'] =
data['Close'].rolling(window=20).mean() data['STD'] =
data['Close'].rolling(window=20).std() data['Upper'] = data['MA'] +
(data['STD'] * 2) data['Lower'] = data['MA'] - (data['STD'] * 2)
\# Generate trading signals
data['Signal'] = 0
data['Signal'] = np.where(data['Close'] < data['Lower'], 1, 0)
data['Signal'] = np.where(data['Close'] > data['Upper'], -1, data['Signal'])

\# Calculate strategy returns


data['Strategy_Returns'] = data['Returns'] * data['Signal'].shift(1)

\# Plot results
data[['Close', 'Upper', 'Lower']].plot()
plt.show()

```
Here, the strategy generates buy signals when the price drops below
the lower band and sell signals when it rises above the upper band,
betting on the price reverting to its mean.
3. Arbitrage Strategies
Arbitrage strategies exploit price discrepancies between different
markets or instruments. These discrepancies are usually short-lived,
requiring quick execution to capture profits.
Emma saw arbitrage as a sophisticated balancing act—akin to
spotting a momentary imbalance in a scale and correcting it before
anyone else notices. Common examples include statistical arbitrage,
pairs trading, and convertible arbitrage.
Example:
```python # Load historical prices of two correlated stocks stock1 =
pd.read_csv('stock1_prices.csv', index_col='Date',
parse_dates=True) stock2 = pd.read_csv('stock2_prices.csv',
index_col='Date', parse_dates=True)
\# Calculate the spread
spread = stock1['Close'] - stock2['Close']

\# Calculate trading signals based on z-score of the spread


mean_spread = spread.rolling(window=20).mean()
std_spread = spread.rolling(window=20).std()
z_score = (spread - mean_spread) / std_spread

\# Generate buy and sell signals


signals = np.where(z_score > 2, -1, np.nan) \# Short spread
signals = np.where(z_score < -2, 1, signals) \# Long spread
signals = pd.Series(signals, index=spread.index).fillna(method='ffill')

\# Plot the spread and signals


spread.plot(label='Spread')
signals.plot(label='Signals', secondary_y=True)
plt.legend()
plt.show()

```
In this scenario, Emma explored pairs trading, where two historically
correlated stocks are traded based on deviations from their historical
spread.
4. High-Frequency Trading (HFT)
High-frequency trading involves executing a large number of orders
at extremely high speeds. HFT strategies often rely on sophisticated
algorithms and low-latency infrastructure to capitalize on minuscule
price differentials.
Emma admired HFT for its precision and speed, akin to a
hummingbird darting from flower to flower—swift, calculated, and
relentless. Common techniques include market making, statistical
arbitrage, and latency arbitrage.
While implementing HFT strategies requires specialized infrastructure
and expertise, Emma noted that they exemplify the pinnacle of
algorithmic trading, where every millisecond counts.
5. Market Making
Market making strategies involve simultaneously placing buy and sell
orders to capture the spread between bid and ask prices. Market
makers provide liquidity to the market, earning profits from the
spread.
Emma saw market making as a dance of balance, akin to a savvy
shopkeeper who buys low and sells high, maintaining a constant
stream of inventory.
Example:
```python class MarketMaker: def init(self, symbol): self.symbol =
symbol self.position = 0 self.cash = 100000 self.inventory = 0
def place_orders(self, bid_price, ask_price):
\# Place buy order at bid price
self.buy_order(bid_price, 100)
\# Place sell order at ask price
self.sell_order(ask_price, 100)

def buy_order(self, price, quantity):


self.inventory += quantity
self.cash -= price * quantity

def sell_order(self, price, quantity):


self.inventory -= quantity
self.cash += price * quantity

def mark_to_market(self, market_price):


return self.cash + self.inventory * market_price

\# Initialize market maker


mm = MarketMaker('AAPL')
mm.place_orders(150.0, 151.0)

```
In this simplified example, a market maker places buy and sell
orders around the current market price, aiming to profit from the
spread.
6. Statistical Arbitrage
Statistical arbitrage strategies use statistical models to identify
mispricings between related instruments. These models often involve
mean reversion and co-integration techniques.
Emma saw statistical arbitrage as a sophisticated puzzle, where the
trader pieces together relationships and patterns to spot
opportunities.
Example:
```python from statsmodels.tsa.stattools import coint
\# Cointegration test between two stocks
coint_result = coint(stock1['Close'], stock2['Close'])
print(f'P-value: {coint_result[1]}')

\# If p-value is low, consider the pair for trading


if coint_result[1] < 0.05:
print("The pair is cointegrated and suitable for trading.")
else:
print("The pair is not cointegrated.")
```
This example demonstrates how Emma can use cointegration tests
to identify pairs of stocks suitable for statistical arbitrage. Each
strategy, from trend-following to high-frequency trading, offered
unique insights and opportunities. With every new strategy she
mastered, Emma felt more equipped to navigate the dynamic and
competitive world of algorithmic trading.

Overview of Financial Markets


Emma could still remember the first time she walked through the
doors of the Vancouver Stock Exchange. The environment, the
flashing screens, the constant hum of activity—it was a world unto
itself. As she dived deeper into the complexities of algorithmic
trading, she realized that a solid understanding of financial markets
was not just beneficial but essential.
Financial markets are vast, intricate ecosystems where various
financial instruments are traded. They function as platforms for the
issuance, buying, and selling of stocks, bonds, currencies,
derivatives, and other assets. These markets play a crucial role in
the allocation of resources, price discovery, and risk management,
acting as the heartbeat of the global economy.
1. Different Types of Financial Markets
Financial markets can be broadly categorized into several types,
each with its own unique characteristics and players.
a. Stock Markets
Stock markets, such as the New York Stock Exchange (NYSE) and
NASDAQ, are where shares of publicly traded companies are bought
and sold. These markets serve as a barometer of economic health,
reflecting investor sentiment and expectations about future
corporate performance.
Emma imagined the stock market as a marketplace where people
from all walks of life come to buy and sell ownership stakes in
companies, each transaction reflecting a collective judgment about
the future.
b. Bond Markets
Bond markets, or debt markets, are venues where debt securities
such as government and corporate bonds are traded. These markets
allow entities to raise capital by borrowing from investors in
exchange for periodic interest payments and the return of principal
at maturity.
Visualizing the bond market, Emma saw it as a sophisticated lending
platform where governments and corporations come to secure long-
term funding, leveraging the trust and creditworthiness they’ve built
over time.
c. Currency Markets
The foreign exchange (forex) market is the largest and most liquid
financial market in the world, where currencies are traded against
one another. This market operates 24 hours a day, five days a week,
and supports various transactions, from multinational business
operations to individual trading.
To Emma, the forex market resembled a vast global bazaar, where
traders exchange the lifeblood of international commerce—currency
—at breakneck speeds.
d. Commodities Markets
Commodities markets trade in raw or primary products such as gold,
oil, and agricultural goods. These markets can be divided into hard
commodities (like metals and energy) and soft commodities (like
coffee and wheat).
Emma saw the commodities market as a dynamic arena where the
tangible essentials of daily life—energy, food, and raw materials—are
traded, affecting everything from the price of gas to the cost of
bread.
e. Derivatives Markets
Derivatives markets involve instruments like futures, options, and
swaps, which derive their value from underlying assets. These
markets enable participants to hedge risks, speculate on future price
movements, and gain exposure to assets without actually owning
them.
Envisioning the derivatives market, Emma thought of it as a chess
game where each move is a calculated bet on the outcome of future
events, requiring both strategy and foresight.
2. Role of Financial Markets
Financial markets serve multiple vital functions that sustain the
global economy.
a. Price Discovery
Financial markets facilitate price discovery, where the forces of
supply and demand interact to determine the prices of assets.
Efficient price discovery helps allocate resources optimally and
reflects all available information.
Emma appreciated the elegance of price discovery, seeing it as a
continuous auction where prices dynamically adjust to new
information, balancing the interests of buyers and sellers.
b. Capital Allocation
Financial markets enable efficient capital allocation by directing
funds to their most productive uses. Companies raise capital for
expansion, governments fund infrastructure projects, and individuals
invest in opportunities for growth.
Emma saw capital allocation as the engine of economic progress,
where investments fuel innovation and development across
industries.
c. Risk Management
Markets provide tools for managing and hedging risks. Derivatives
allow participants to protect against adverse price movements, while
diversification strategies reduce exposure to specific risks.
To Emma, risk management was akin to insurance—essential for
stability and resilience, allowing market participants to navigate
uncertainty with confidence.
d. Liquidity Provision
Markets ensure liquidity, allowing participants to quickly buy or sell
assets without significantly affecting their prices. High liquidity
reduces transaction costs and enhances market stability.
Emma imagined liquidity as the lifeblood of markets, enabling rapid
and seamless transactions that keep the economic pulse steady and
strong.
3. Market Participants
Different actors in financial markets drive its dynamics, each playing
a distinct role.
a. Retail Investors
Retail investors are individual participants who trade for personal
accounts. They bring diversity and liquidity to the markets but may
lack the resources and information of institutional players.
b. Institutional Investors
Institutional investors such as mutual funds, pension funds, and
hedge funds manage large pools of capital. Their trades can
significantly influence market prices, and they often employ
sophisticated strategies and extensive research.
c. Market Makers
Market makers provide liquidity by continuously quoting buy and sell
prices for securities. They profit from the bid-ask spread and play a
crucial role in market efficiency.
d. Regulatory Bodies
Regulatory bodies, such as the Securities and Exchange Commission
(SEC) in the U.S., oversee market activities to ensure fairness,
transparency, and investor protection.
e. Brokers and Dealers
Brokers facilitate transactions between buyers and sellers, earning
commissions for their services. Dealers, on the other hand, trade for
their own accounts, risking their capital in the process.
4. How Financial Markets Are Structured
Understanding the structure of financial markets is essential for
effective trading and investing.
a. Primary vs. Secondary Markets
In primary markets, new securities are issued directly by entities to
raise capital. In secondary markets, existing securities are traded
among investors.
b. Exchange-Traded vs. Over-The-Counter (OTC) Markets
Exchange-traded markets are centralized platforms with
standardized procedures and regulations, such as stock exchanges.
OTC markets operate through a network of dealers and are less
regulated, offering more flexibility in trading.
c. Order-Driven vs. Quote-Driven Markets
Order-driven markets match buyers and sellers through an order
book, while quote-driven markets rely on market makers to provide
liquidity and set prices.
As Emma deepened her understanding of financial markets, she
began to appreciate their complexity and interconnectedness. Each
transaction, each price movement was part of a larger narrative—a
story of supply and demand, risk and reward, innovation, and
regulation. With this foundational knowledge, she felt more
equipped to navigate the labyrinthine world of algorithmic trading,
transforming insights into winning strategies.
In the following section, we will explore the legal and ethical
considerations in algorithmic trading, providing a framework for
responsible and compliant trading practices in an increasingly
regulated environment.
Legal and Ethical Considerations
Navigating the complex waters of algorithmic trading requires more
than just technical acumen and market insights. Emma, now an
established algorithmic trader, vividly recalls a critical turning point in
her career—a moment when she realized that understanding legal
and ethical considerations is as crucial as mastering any trading
strategy. Her mentor had once said, "Trading without a solid ethical
and legal foundation is like building a house on sand." This wisdom
resonated deeply with Emma, compelling her to dive into the often-
overlooked yet vital aspects of compliance and integrity in trading.
Financial markets across the globe are regulated by various
governmental and independent bodies to ensure fairness,
transparency, and investor protection. The regulatory landscape,
while complex, provides clear guidelines that traders need to follow
to avoid legal repercussions.
a. Global Regulatory Bodies
Different countries have their own regulatory authorities, such as the
Securities and Exchange Commission (SEC) in the United States, the
Financial Conduct Authority (FCA) in the United Kingdom, and the
International Organization of Securities Commissions (IOSCO), which
sets global standards.
Emma considered these entities the guardians of financial markets,
ensuring that all participants play by the rules. Each body enforces a
set of regulations designed to maintain market integrity, prevent
fraud, and protect investors.
b. Key Regulations
Key regulations in algorithmic trading include the Markets in
Financial Instruments Directive (MiFID II) in Europe, the Dodd-Frank
Act in the U.S., and similar frameworks worldwide. These regulations
mandate transparency, record-keeping, and the monitoring of
trading activities.
Emma noted that compliance with these regulations required
meticulous record-keeping and continuous monitoring of trading
algorithms to ensure they do not engage in manipulative practices.
Violations could lead to hefty fines, reputational damage, or even
trading bans.

2. Ethical Considerations
Ethical trading goes beyond mere regulatory compliance. It involves
a commitment to fairness, transparency, and integrity. In Emma's
journey, she encountered several ethical dilemmas that tested her
principles and shaped her career.
a. Market Manipulation
Market manipulation involves artificially affecting the price or volume
of securities. Practices such as spoofing (placing fake orders to move
prices) and insider trading (trading based on non-public information)
are strictly prohibited.
Emma remembered a colleague who faced serious consequences for
engaging in spoofing. This experience reinforced the importance of
maintaining honest and fair trading practices. Manipulative actions
not only harm the market but also erode trust among participants.
b. Fairness and Transparency
Traders must ensure that their actions do not unfairly disadvantage
other market participants. This includes being transparent about
conflicts of interest and executing trades in a manner that ensures
fair pricing and liquidity for all.
Emma's firm had implemented strict policies to foster a culture of
transparency. They regularly audited their trading algorithms to
ensure no unethical practices slipped through the cracks. This
diligence helped build a reputation of trust and reliability with clients
and regulators alike.
3. Compliance Strategies
Implementing effective compliance strategies is essential to avoid
legal pitfalls and uphold ethical standards. Emma developed a robust
compliance framework that became a model for her peers.
a. Automated Compliance Monitoring
Automated systems can monitor trading activities in real-time,
flagging any suspicious behavior that could indicate market
manipulation or other unethical practices. These systems provide a
critical layer of oversight, ensuring that all trades comply with
regulatory requirements.
Emma invested in advanced compliance software that integrated
seamlessly with her trading algorithms. This proactive approach
allowed for immediate detection and correction of potential issues,
minimizing risks and enhancing trust.
b. Regular Audits and Reviews
Conducting regular audits and comprehensive reviews of trading
activities helps identify and rectify lapses in compliance.
Independent audits, coupled with internal reviews, ensure that all
aspects of trading operations adhere to legal and ethical standards.
Emma's firm held bi-annual audits led by external consultants,
combined with monthly internal reviews. These rigorous checks
fostered a culture of continuous improvement and accountability,
significantly reducing the likelihood of non-compliance.
c. Training and Education
Ongoing education and training for all team members on regulatory
changes and ethical standards are crucial. Staying updated with the
latest regulations and ethical best practices helps maintain a high
level of integrity and compliance.
Emma organized regular workshops and training sessions, inviting
legal experts and ethicists to speak. This initiative not only kept her
team well-informed but also reinforced the importance of ethical
conduct in trading.
Emma's journey illustrates that mastering legal and ethical
considerations is integral to long-term success in algorithmic trading.
A strong legal and ethical foundation not only protects traders from
legal repercussions but also builds trust and credibility in the market.
As algorithmic trading continues to evolve, staying ahead of
regulatory requirements and maintaining unwavering ethical
standards will be crucial for sustained success.
Having navigated the legal and ethical landscape, the next step in
refining your algorithmic trading setup involves understanding the
skills and tools required to excel. The following section will delve into
the essential skills and tools needed to thrive in this dynamic field,
providing a roadmap for both novice and experienced traders.
Emma's personal reflections and real-world scenarios provide a
relatable context, making the intricate details of legal and ethical
considerations accessible and engaging. This approach ensures
readers not only grasp the importance of these aspects but also feel
inspired to uphold the highest standards in their trading practices.
Required Skills and Tools
a. Programming Proficiency
An essential skill for any algorithmic trader is proficiency in
programming languages. Python stands out as a preferred choice
due to its simplicity and extensive libraries that cater specifically to
financial applications.
Example: Python Basics ```python # Example: Simple Moving
Average import pandas as pd
\# Load historical stock data
data = pd.read_csv('historical_stock_data.csv')

\# Calculate a 30-day moving average


data['30_day_SMA'] = data['Close'].rolling(window=30).mean()
\# Display the moving average
print(data[['Date', 'Close', '30_day_SMA']].tail())

``` Python's versatility extends beyond simple computations,


enabling the creation of complex trading strategies and integration
with various data sources.
b. Data Analysis and Statistical Methods
Algorithmic trading relies heavily on data. Understanding data
analysis and statistical methods allows traders to interpret market
signals and identify trading opportunities. Proficiency in libraries such
as Pandas for data manipulation and NumPy for numerical
computations is invaluable.
Example: Data Handling with Pandas ```python import pandas
as pd
\# Load data
data = pd.read_csv('stock_data.csv')

\# Data analysis
mean_price = data['Close'].mean()
std_dev_price = data['Close'].std()

print(f'Average Closing Price: {mean_price}')


print(f'Standard Deviation of Closing Price: {std_dev_price}')

``` By mastering these tools, traders can perform sophisticated data


analysis, backtesting, and strategy optimization.

2. Financial Knowledge
a. Market Fundamentals
A deep understanding of financial markets and instruments is crucial.
This includes knowledge of stocks, bonds, commodities, currencies,
and derivatives. Understanding how these markets operate and
interact helps in making informed trading decisions and developing
robust strategies.
b. Economic Indicators and Their Impact
Economic indicators such as GDP, unemployment rates, and inflation
figures can significantly affect market movements. Knowing how to
interpret these indicators and anticipate their impact on different
asset classes is a valuable skill.
Emma developed a habit of regularly reading financial news and
reports to stay updated with economic trends and events that could
influence market conditions.

3. Quantitative Analysis
a. Mathematical and Statistical Modelling
Quantitative analysis involves creating models to predict future
market movements based on historical data. This requires a solid
foundation in mathematics and statistics.
Emma often used regression analysis, time-series forecasting, and
machine learning algorithms to develop and refine her trading
strategies.
Example: Simple Linear Regression with Scikit-Learn
```python from sklearn.linear_model import LinearRegression
import numpy as np
\# Prepare data
X = np.array(data['Volume']).reshape(-1, 1)
y = np.array(data['Close'])

\# Create and train the model


model = LinearRegression()
model.fit(X, y)

\# Predict closing prices


predictions = model.predict(X)

\# Plot predictions
import matplotlib.pyplot as plt
plt.scatter(X, y, color='blue')
plt.plot(X, predictions, color='red')
plt.show()

``` b. Risk Management Techniques


Risk management is an integral part of algorithmic trading.
Understanding and implementing techniques such as stop-loss
orders, position sizing, and diversification can mitigate potential
losses and enhance long-term profitability.
Emma's strategy always incorporated risk management principles,
ensuring that she never risked more than a small percentage of her
capital on any single trade.

4. Tools and Platforms


a. Trading Platforms and APIs
Many algorithmic traders utilize trading platforms that offer APIs for
programmatic trading. Popular choices include Interactive Brokers,
Alpaca, and MetaTrader. These platforms allow for the automation of
trading strategies and real-time data handling.
b. Data Sources
Reliable data sources are essential for both backtesting and live
trading. Financial data providers like Bloomberg, Yahoo Finance, and
Alpha Vantage offer comprehensive datasets that can be seamlessly
integrated into trading algorithms.
Example: Fetching Data via Alpha Vantage API ```python
import requests
\# Alpha Vantage API key
api_key = 'your_api_key'

\# Fetch stock data


url = f'https://www.alphavantage.co/query?
function=TIME_SERIES_DAILY&symbol=MSFT&apikey={api_key}'
response = requests.get(url)
data = response.json()

\# Display data
print(data)

``` Emma found that having access to high-quality data was critical
for refining her strategies and improving their performance.
c. Development Tools
Integrated development environments (IDEs) like Jupyter
Notebooks, PyCharm, and Visual Studio Code streamline the coding
process, offering features like debugging, code suggestion, and
version control integration.
Emma preferred using Jupyter Notebooks for its interactive
environment, which made it easier to test and visualize her
algorithms step-by-step.
d. Analytical Libraries
Libraries such as SciPy, Statsmodels, and Seaborn extend Python's
capabilities, enabling advanced statistical analysis, hypothesis
testing, and data visualization.
Example: Plotting with Seaborn ```python import seaborn as
sns import matplotlib.pyplot as plt
\# Plot distribution of closing prices
sns.histplot(data['Close'], kde=True)
plt.title('Distribution of Closing Prices')
plt.show()

```
Emma's journey into algorithmic trading was marked by a
continuous quest for knowledge and mastery of both the skills and
tools required to excel. With a strong foundation in programming,
data analysis, financial markets, and risk management, coupled with
access to powerful tools and platforms, you too can navigate the
intricate world of algorithmic trading with confidence and precision.
Equipped with the necessary skills and tools, your next step involves
getting practical with Python, the programming language that has
become the backbone of algorithmic trading. The following section
will guide you through the essentials of using Python for trading,
setting the stage for developing your first algorithmic trading
strategies.
Emma's story and practical examples provide a relatable context,
making the technical and financial aspects of algorithmic trading
accessible and engaging. This approach ensures readers not only
understand the required skills and tools but feel confident in their
ability to apply them effectively.
Introduction to Python for Trading
Python's widespread adoption in the financial industry is due to
several compelling reasons:
a. Simplicity and Readability
Python’s syntax is straightforward, making it easy to learn and write
code quickly. This simplicity allows traders to focus more on
developing and refining their trading strategies than on getting
bogged down by complex syntax.
b. Extensive Libraries
Python boasts a rich ecosystem of libraries that are particularly
useful for trading. Libraries such as Pandas, NumPy, and Matplotlib
allow for efficient data manipulation, numerical computation, and
data visualization. Additionally, specialized libraries like Zipline and
PyAlgoTrade provide tools specifically designed for backtesting
trading strategies.
c. Community and Support
Python has a massive, active community of developers who
contribute to its vast repository of open-source resources. This
community support means that help is always available, whether
through forums, tutorials, or documentation.
Emma found Python's combination of simplicity and power to be
invaluable in translating her trading ideas into executable algorithms
quickly.

2. Setting Up Your Python


Environment
Before diving into coding, you'll need to set up a Python
development environment. The following steps outline the process:
a. Installing Python
Begin by installing the latest version of Python from the official
website. Ensure that Python is added to your system's PATH during
installation.
b. Installing an Integrated Development Environment (IDE)
While Python can be written in any text editor, using an IDE makes
the process much more efficient. Popular choices include Jupyter
Notebooks for its interactive capabilities and Visual Studio Code for
its robust development tools.
c. Installing Essential Libraries
Use Python’s package manager, pip, to install the libraries you'll
need. Below is a list of essential libraries for algorithmic trading:
```sh pip install pandas numpy matplotlib seaborn scikit-learn pip
install zipline pyalgotrade
```

3. Basic Python Programming


Concepts for Trading
a. Data Types and Variables
Variables in Python can store different types of data such as
integers, floats, strings, and more. For instance, you might store the
closing price of a stock in a float variable.
Example: Variables ```python # Storing stock price closing_price
= 150.25
\# Printing the variable
print(closing_price)

```
b. Control Structures
Control structures like loops and conditional statements are used to
execute code based on certain conditions, which is crucial for
iterating over data and making decisions in trading algorithms.
Example: Conditional Statements and Loops ```python #
Example: Check if stock price increased previous_close = 148.75
current_close = 150.25
if current_close > previous_close:
print("The stock price increased.")
else:
print("The stock price decreased.")

```
c. Functions and Modules
Functions allow for reusable code blocks, making your trading
algorithms modular and easier to maintain. Modules are collections
of functions and variables that can be imported as needed.
Example: Functions ```python # Function to calculate percentage
change def percentage_change(old_price, new_price): return
((new_price - old_price) / old_price) * 100
\# Using the function
change = percentage_change(148.75, 150.25)
print(f"Percentage Change: {change:.2f}%")
```
4. Data Handling with Pandas
Pandas is a powerful library for data manipulation and analysis,
widely used in the trading industry for handling time series data.
a. Loading and Inspecting Data
Loading data into a Pandas DataFrame is straightforward, and once
loaded, you can inspect and manipulate the data easily.
Example: Loading and Inspecting Data ```python import
pandas as pd
\# Load CSV file into a DataFrame
data = pd.read_csv('historical_stock_data.csv')

\# Display the first few rows


print(data.head())

```
b. Data Manipulation
Pandas provides numerous functions for data manipulation, such as
calculating moving averages, summarizing statistics, and merging
datasets.
Example: Calculating Moving Averages ```python # Calculate
a 30-day moving average data['30_day_SMA'] =
data['Close'].rolling(window=30).mean()
\# Display the last few rows
print(data[['Date', 'Close', '30_day_SMA']].tail())

```

5. Plotting and Visualization with


Matplotlib
Visualization is a key component in trading, helping you understand
market trends and validate your strategies.
Example: Plotting Stock Prices ```python import
matplotlib.pyplot as plt
\# Plot closing prices
plt.figure(figsize=(10, 5))
plt.plot(data['Date'], data['Close'], label='Closing Price')
plt.plot(data['Date'], data['30_day_SMA'], label='30-Day SMA', color='red')
plt.xlabel('Date')
plt.ylabel('Price')
plt.title('Stock Prices with 30-Day SMA')
plt.legend()
plt.show()

```

6. Handling Financial Data with


Pandas
Financial data often requires specific handling, such as managing
time series data and dealing with missing values.
Example: Handling Missing Data ```python # Fill missing values
with the previous value data.fillna(method='ffill', inplace=True)
\# Display the data
print(data)

```

7. Practical Example: Simple


Trading Strategy
Let's put it all together with a simple trading strategy: a moving
average crossover strategy. This strategy involves buying when a
short-term moving average crosses above a long-term moving
average and selling when it crosses below.
Example: Moving Average Crossover Strategy ```python #
Calculate short-term and long-term moving averages
data['Short_MA'] = data['Close'].rolling(window=20).mean()
data['Long_MA'] = data['Close'].rolling(window=50).mean()
\# Generate trading signals
data['Signal'] = 0
data['Signal'][20:] = np.where(data['Short_MA'][20:] > data['Long_MA'][20:], 1,
0)
data['Position'] = data['Signal'].diff()

\# Plot the strategy


plt.figure(figsize=(10, 5))
plt.plot(data['Date'], data['Close'], label='Closing Price')
plt.plot(data['Date'], data['Short_MA'], label='20-Day MA', color='blue')
plt.plot(data['Date'], data['Long_MA'], label='50-Day MA', color='red')
plt.plot(data[data['Position'] == 1]['Date'], data['Short_MA'][data['Position'] ==
1], '^', markersize=10, color='g', lw=0, label='Buy Signal')
plt.plot(data[data['Position'] == -1]['Date'], data['Short_MA'][data['Position'] ==
-1], 'v', markersize=10, color='r', lw=0, label='Sell Signal')
plt.xlabel('Date')
plt.ylabel('Price')
plt.title('Moving Average Crossover Strategy')
plt.legend()
plt.show()

```
Emma's initial foray into Python for trading opened up a world of
possibilities, enabling her to transform abstract trading ideas into
concrete, executable strategies.
Having laid the foundation with Python, we will next explore how to
set up your development environment for algorithmic trading. This
involves not only installing necessary tools but also configuring your
system for optimal performance and efficiency, ensuring you're well-
equipped to embark on your trading journey.
This detailed and structured approach ensures that readers gain a
comprehensive understanding of Python's role in algorithmic trading,
empowering them to leverage this powerful tool effectively.
Imagine you’ve just decided to dive into the world of algorithmic
trading. You've sketched out some initial strategies on paper, and
now it’s time to bring them to life. But where do you start? Setting
up an effective development environment is the first step in your
journey. It’s akin to setting up a high-tech aquarium for your prized
fish—everything needs to be just right to ensure a thriving
ecosystem.

Understanding the Basics


Before diving into the specifics, let’s outline what a development
environment entails. a development environment is a workspace
where you can write, test, and debug your code. For algorithmic
trading, this environment needs to be robust enough to handle
complex computations, real-time data feeds, and seamless
integration with various APIs and libraries.

Choosing Your Tools


The cornerstone of your development environment is the Integrated
Development Environment (IDE) or code editor you choose. While
there are many options available, each comes with its pros and cons.
Let's explore a few popular choices:

1. PyCharm: Known for its powerful features tailored for


Python development, PyCharm offers robust debugging
tools, intelligent code completion, and seamless integration
with version control systems. Its professional version
includes scientific tools and web development support,
which are beneficial for comprehensive trading strategies.
2. VS Code: Visual Studio Code is a lightweight yet powerful
source code editor. With a rich ecosystem of extensions, it
can be customized to fit your trading needs. The Python
extension, in particular, brings in support for Jupyter
Notebooks, which is essential for data analysis and
visualization.
3. Jupyter Notebooks: While not a traditional IDE, Jupyter
Notebooks are indispensable for exploratory data analysis.
They allow you to run code in chunks, visualize data, and
document your process all in one place. This is highly
useful for testing new trading algorithms in an interactive
manner.

Setting Up Python
Python is the scripting language of choice for algorithmic trading due
to its simplicity and the vast number of libraries available for data
manipulation, numerical analysis, and machine learning. To get
started, ensure Python is installed on your machine. You can
download the latest version from python.org.
Once installed, it’s crucial to manage packages efficiently. This is
where Anaconda comes in. Anaconda is a distribution of Python and
R focused on data science and machine learning. It simplifies
package management and deployment, making it easier to manage
the numerous libraries you’ll be using.

1. Download and Install Anaconda: Visit the Anaconda


website and download the installer for your operating
system. Follow the installation instructions, and once
installed, you can use the Anaconda Navigator or the
command line interface (CLI) to manage packages.
2. Create a Virtual Environment: Virtual environments are
isolated spaces where you can install specific packages
required for different projects without conflicts. In
Anaconda, you can create a virtual environment using the
following commands: ```bash conda create -n trading_env
python=3.8 conda activate trading_env

`` This creates and activates a new environment namedtrading_env` with


Python version 3.8.
1. Install Essential Libraries: With your environment set
up, you can now install the essential libraries: ```bash
conda install numpy pandas matplotlib scikit-learn pip
install yfinance

`` These libraries include NumPy for numerical computing, Pandas for data
manipulation, Matplotlib for plotting, Scikit-learn for machine learning,
andyfinance` for accessing Yahoo Finance API.

Version Control with Git


Version control is crucial for tracking changes, collaborating with
others, and reverting to previous versions of your code. Git is the
most widely used version control system, and GitHub is a popular
platform for hosting repositories.

1. Install Git: Download and install Git from git-scm.com.


Follow the installation instructions specific to your
operating system.
2. Configure Git: After installation, configure Git with your
user information: ```bash git config --global user.name
"Your Name" git config --global user.email
"[email protected]"

```
1. Initialize a Repository: Navigate to your project
directory and initialize a new Git repository: ```bash git
init
You can now stage and commit your changes:bash git add . git commit -m
"Initial commit"
```
1. Push to GitHub: Create a new repository on GitHub and
follow the instructions to push your local repository to
GitHub. This typically involves adding a remote URL and
pushing the changes: ```bash git remote add origin
https://github.com/yourusername/your-repository.git git
push -u origin master

```

Setting Up Jupyter Notebooks


Jupyter Notebooks are integral for data analysis in algorithmic
trading. They allow you to create and share documents that contain
live code, equations, visualizations, and narrative text.
1. Installation: If you have installed Anaconda, Jupyter
Notebooks are included by default. You can also install it
using pip: ```bash pip install jupyter

```
1. Launching Jupyter: Start the Jupyter server by running:
```bash jupyter notebook

``` This will open a new tab in your default web browser, where you
can create and manage notebooks.
1. Creating a Notebook: In the Jupyter interface, click on
"New" and select "Python 3" to create a new notebook.
You can now start writing and executing code in an
interactive environment.
Integrating APIs
Algorithmic trading often involves interacting with APIs to fetch real-
time data and execute trades. Two common APIs are the Yahoo
Finance API and the Interactive Brokers API.

1. Yahoo Finance API: The yfinance library provides a simple


way to fetch historical market data. Here’s an example of
how to use it: ```python import yfinance as yf
# Fetch historical data for Apple data =
yf.download('AAPL', start='2020-01-01', end='2021-01-01')
print(data.head())
```
1. Interactive Brokers API: The Interactive Brokers (IB)
API is more complex but offers comprehensive trading
functionalities. You’ll need to install the ib_insync library:
```bash pip install ib_insync

Here’s a basic example of connecting to Interactive Brokers and fetching account


information:python from ib_insync import *
ib = IB()
ib.connect('127.0.0.1', 7497, clientId=1)

account = ib.accountSummary()
print(account)
```

Final Touches: Security and


Maintenance
As you set up your development environment, it’s essential to
consider security and maintainability.
1. Data Security: Ensure sensitive data like API keys and
passwords are not hard-coded in your scripts. Use
environment variables or configuration files for storing such
information securely.
2. Regular Backups: Regularly back up your code and data
to prevent loss in case of hardware failures or other issues.
Tools like GitHub and cloud storage services can automate
this process.
3. Regular Updates: Keep your libraries and tools up to
date to benefit from the latest features and security
patches. Use tools like pip and conda to manage updates
efficiently.

Setting up a robust development environment is the foundation of


successful algorithmic trading. It’s a meticulous process that involves
choosing the right tools, configuring your workspace, and ensuring
security and maintainability. With your environment set up, you’re
now ready to embark on your journey, turning innovative trading
ideas into executable strategies.
CHAPTER 2: FINANCIAL
MARKET BASICS

I
n the ecosystem of financial markets, a diverse array of
participants interacts to create a dynamic and complex
environment. Each participant brings unique motivations,
strategies, and impacts, shaping the market landscapes in myriad
ways. Understanding the roles and behaviors of these players is
crucial for any aspiring algorithmic trader. Let’s delve into the
different types of market participants, their objectives, and how they
influence market dynamics.

Individual Investors
Profile and Objectives: Individual investors, also known as retail
investors, are private individuals who invest their personal savings in
financial markets. Their objectives can range from long-term wealth
accumulation for retirement to short-term gains through day trading.
They often have less capital and access to fewer resources
compared to institutional investors.
Behavior and Strategies: Individual investors generally rely on a
mix of fundamental analysis, technical analysis, and personal
intuition. They utilize platforms like Robinhood, E*TRADE, or TD
Ameritrade to execute trades, benefiting from educational resources
and user-friendly interfaces. While some adopt a buy-and-hold
Random documents with unrelated
content Scribd suggests to you:
whom he still keeps up a friendly correspondence. Among the
students at that time from this side of the Atlantic, were the present
Sir Charles Tupper, M.D., C.B.; the Hon. Dr. D. McNeil Parker, of
Halifax; and the late Dr. R. H. Russell, of Quebec. On his return to
Canada he received, on the 1st August, 1843, the license of the
Montreal Medical Board, and immediately settled in Sherbrooke,
Eastern townships, where he soon built up an extensive practice,
and where he has since continued to reside. He has the fullest
confidence of the community in his skill as a physician, and for over
thirty years has had nearly all the surgical practice in his district of
country. He has the full confidence of his confrères, who frequently
send for him from long distances for consultations. Dr. Worthington,
it will not be out of place to say here, was the first surgeon in
Canada who performed a capital operation under ether as an
anæsthetic, and was also among the first to use chloroform. On the
10th March, 1847, he amputated below the knee, under ether; and
in January, 1848, three cases under chloroform, one being excision
of bone. In 1854 the University of Bishop’s College, Lennoxville,
conferred upon him the degree of M.A., honoris causa; and in 1868,
McGill College, Montreal, that of M.D.C.M., ad eundem. He is also a
fellow of the Royal College of Surgeons of Edinburgh; corresponding
member of the Medico-Chirurgical Society of Montreal, and of the
Gynæcological Society of Boston, Massachusetts; member of the
Canada Medical Association, having been, in 1877, vice-president for
the province of Quebec; and for many years one of the governors of
the College of Physicians and Surgeons of Quebec, for the District of
St. Francis. The doctor has received several substantial marks of
public favor, among others, a solid silver tea-service, for his
gratuitous attendance on the poor; and a gold watch and chain for
his energetic and successful efforts to prevent the spread of that
most loathsome of all diseases in Sherbrooke, the small pox. In the
years 1837-8, Dr. Worthington served as a private in Captain Le
Mesurier’s company of the Quebec regiment of Volunteer Light
Infantry, the adjutant being the late Lieut.-Colonel Thomas Wily. The
doctor is a warm supporter of the volunteer movement in Canada,
and has served in the 53rd Battalion since its formation. He was on
Many of these young men did noble work, regardless of
danger. Where the bullets fell thickest, with a heroism that has
never been exceeded, they were to be found, removing the
wounded and the dying to places of shelter and of safety in the
rear. Some cases of individual heroism are reported to me,
which I feel call for more than a passing remark; and embolden
me to say that amongst these non-combatant lads, and the staff
to which they belonged, are to be found some of the greatest
heroes of the war. At Batoche I am told that during the fight a
flag was thrust from the window of the church, and was
observed by a surgeon and a student who were under shelter
from the fire at a couple of hundred yards distance. The
student, immediately he perceived it, proposed that a party
should at once go to the relief of the one demanding succor. No
one appeared willing to second his proposal. To go to the
church through the open under such a terrible fire as was being
poured from the Half-breed pits, seemed to be like proceeding
to certain death; but persisting, the surgeon said: “if you are
determined to go, and we can find two volunteers to assist us in
carrying a stretcher, I am with you.” Two men from the
Grenadiers of Toronto at once stepped forward; and the four
started upon their perilous journey—crawling upon their bellies
—taking advantage of any little inequality of ground to cover
them, and to shield them from the bullets of the Half-breeds.
They reached the church—the bullets tearing up the earth all
around them—without a scratch, and, breathing a short prayer
for their deliverance thus far from death and danger, they
looked around for him whom they had risked, and were still
risking, their lives, to succor and to save. They found him in the
person of a venerable priest, who had been wounded in the
thigh, and they at once proceeded to remove him, after
administering temporary aid. To remain in the church was to
court certain death. To return to their corps seemed to be no
less perilous; but they chose the latter. When they sortied from
the church, so astonished were the Half-breeds at their daring
that they ceased their fire for a moment. This time, returning,
they had no cover, and were obliged to march erect. Bullets flew
thick and fast; but the condition of the wounded man precluded
anything like hurry, and they hastened slowly. God watched over
them and protected them, and they reached their comrades in
safety, their wounded charge also escaping without further
harm. Such conduct deserves recognition, and I beg respectfully
to call attention to it in this official way. I have not yet been able
to obtain the names of the two noble fellows belonging to the
Grenadiers, but I hope this notice of it will bring the information
I desire. The other two are Surgeon Gravely, of No. 1 Field
Hospital, and Mr. Norreys Worthington, from the same hospital.
The manner in which Captain Mason was rescued and brought
in by, I believe, Dr. Codd, of the 90th, and one of the young
dressers (Mr. Norreys Worthington), was an exhibition of
marked courage by members of the medical staff. Other
instances well deserving of commendation have been reported
to me, and I would respectfully suggest inquiry into all such
cases, and if they be found as reported to me, that honorable
recognition of them be made.

Mr. Worthington claimed descent through Bruen Worthington, of


Ashton Hayes, in the county of Chester, and of Philpotstown, in the
county of Meath, clerk in the Irish House of Commons, in 1734; from
Hugh Worthington, of Worthington, in the county of Lancaster, and
of the Manor of Adlington, in Standish parish. He held the lordship of
Worthington in the 13th year of Edward IV., A.D. 1474.

Vaughan, William, St. Martins, N.B., was born in 1843, in


Liverpool, England, and is consequently in his forty-fifth year. He is
the son of the late Captain William Vaughan, of St. Martins, and it is
by a mere accident that he claims Liverpool as his birthplace. He
received his earlier education in a private school, and afterwards
attended the Model school of St. John, N.B., and the Horton
Academy at Wolfville, N.S. At the age of seventeen Mr. Vaughan was
placed in the office of Farnworth & Jardine, a large shipping firm, of
Liverpool, staying there for two years, getting his initial knowledge
of business life therein. Returning home, he, in 1866, commenced
business on his own account in St. Stephen, N.B. This he continued
successfully until 1873, when, in partnership with another
gentleman, he established the West India produce house of
Vaughan, Clerke & Co. of St. Stephen. On the incorporation of the
town, Mr. Vaughan was elected a member of the first town council,
and was re-elected as such for the two succeeding years. In 1876 he
commenced operations in St. Martins as shipbuilder, building vessels
of the larger class. In 1878 the subject of our sketch sold out his
interest in the St. Stephen firm, and again made his residence in his
boyhood’s home—St. Martins. In 1882, in consequence of the failure
of a Liverpool house which were large clients of his, and also in
consequence of the depreciation which took place in wooden ships,
Mr. Vaughan was compelled to relinquish business. Soon afterwards
he was appointed manager of the Government Savings Bank at St.
Martins, which position he still holds. In religious belief Mr. Vaughan
is a prominent member of the Baptist church, being admitted to
fellowship therein in 1857. He has held many positions of honour in
this connection, all of which he has filled with credit to himself and
with satisfaction to the denomination. Mr. Vaughan is also prominent
in Masonic circles, being a past master of Sussex Lodge, St.
Stephen; past principal of St. Stephen R. A. Chapter; and past
eminent commander of St. Stephen Encampment K.T. In 1867 the
subject of our sketch married a daughter of John Marks, of St.
Stephen, and has a family of three boys and two girls. Mr. Vaughan
has been a life-long total abstainer, not even knowing the taste of
alcoholic liquors. At the present writing (1887) he is the grand chief
templar of the Independent Order of Good Templars in New
Brunswick, and has held the position for two years. Politically, Mr.
Vaughan is a Conservative, although, as between the question of
prohibition and party, if necessary, the latter would have to bow to
the former. A man of good physique and energetic character, Mr.
Vaughan is one of the many of her sons of whom his province, and,
in fact, his country, may be proud.
Fraser, Hon. Duncan C., B.A., Barrister, New Glasgow,
Nova Scotia, was born at New Glasgow, Nova Scotia, on the 1st of
October, 1845. His parents were Alexander Fraser and Annie
Chisholm. He received his primary education at the Normal School,
and graduated B.A. at Dalhousie College in 1872. He also took a
course of instruction in the Military School. He chose law as a
profession, and has succeeded in building up a large and lucrative
business. Mr. Fraser has taken an active interest in municipal affairs,
and for some time was town clerk, and a school trustee. He was
then elevated to the mayoralty of his native town, and occupied the
office for two terms. In provincial politics, he has also participated,
and during the administration of the Hon. P. C. Hill, which held the
reigns of power from 1875 to 1878, he was a member of the
Legislative Council, and held a position in the government without a
portfolio, but he resigned his seat in the council and returned to
private life. In politics he is a Liberal, and a pronounced free trader.
He has been long connected with the temperance reform, and takes
a deep interest in all societies having for their object the
extermination of the traffic in intoxicating drinks. At present he is the
chief of the Independent Order of Good Templars in Nova Scotia. He
is connected with Masonic and Oddfellows orders; and has been a
deputy-grand master of the Masonic body. Mr. Fraser is familiar with
the Maritime provinces, and has twice taken a trip to the Pacific
coast. He is an adherent of the Presbyterian church, and occupies
the position of elder. On the 24th of October, 1878, he was married
to Bessie G. Graham, daughter of William and Annie Graham, of New
Glasgow.

Matheson, Colonel Roderick.—The Honorable


Roderick Matheson, Senator, was born in the parish of Loch Carron,
Ross-shire, Scotland, in December, 1793. He was descended from
the last recognized Chief of Clan Mathan, Dugald Matheson, of
Balmacara, Loch Alsh, Ross-shire, who joined Earl Seaforth in the
Jacobite rebellion, and was killed in the action of Glen Shiel, Glenelg,
on 10th June, 1719. Dugald Matheson left four sons. The three
younger brothers went out to India, and did not return; the eldest,
Roderick, remained at home and married Christina, daughter of
Kenneth Mackenzie, with issue John, Dugald, and a daughter. John
married Flora, daughter of Donald Macrae, of Strath Conan, who also
fought in the Jacobite cause at Culloden, and was obliged to leave
Scotland for some years after the rebellion. John Matheson had issue
two sons, one of them the subject of our sketch, and three
daughters. Col. Matheson’s father died while he was a boy, and while
attending school at Inverness; he was brought out to Canada at the
age of twelve, by his elder brother, and completed his education at a
school in Lower Canada. When the war of 1812 broke out, a
regiment was raised by the Imperial Government, called the
Glengarry Light Infantry Fencibles, and on the 6th Feb., 1812,
Roderick Matheson was gazetted senior ensign, and in 1813, he was
appointed lieutenant and paymaster. During the war he saw a great
deal of active service, being present at the actions of York, Sackett’s
Harbor, Cross Roads, Fort George, Lundy’s Lane, and Fort Erie, and
in nearly all the engagements on the Niagara frontier. He was twice
wounded, once very severely at Sackett’s Harbor, where he was in
command of his company. After the war, he was allowed a year’s
leave on full pay on account of his wound, and in December, 1816,
on the reduction of the army, he was retired on half-pay. In 1817,
with a large number of his comrades in arms, he settled at the town
of Perth, Ont., then founded, and continued to reside there up to the
time of his death, on 13th January, 1873. During the rebellion of
1837, he volunteered with five hundred men for service in Lower
Canada, and, as Colonel commanding the First Military District of
Upper Canada, he took an active interest in the organization of many
of the present volunteer companies in the Ottawa Valley from 1855
to 1863. In 1847, Col. Matheson was appointed a life member of the
Legislative Council of Canada, and, on the confederation of the
provinces in 1867, he was appointed a Senator of the Dominion.
Previous to the appointment of county judges, he was also Chairman
of the Quarter Sessions. He married first, Mary, daughter of Captain
Robertson, of Inverness, Scotland, who died in 1825; second, in
1830, Anna, daughter of the Rev. James Russell, minister of
Gairloch, Ross-shire, Scotland, by whom he had a large family. In
politics Col. Matheson was a staunch Conservative.

Peters, Simon, J.P., Builder and Architect, Quebec, was


born in Youghal, county Cork, Ireland, on the 18th September, 1815.
His father, who died in 1837, had been color-sergeant in H. M. 1st
Battalion 60th Regiment, and had seen active service in the
memorable battles of Salamanca, Vittoria, and Pampalona. The
family had come to Canada some years before the father’s death,
and settled in Quebec. The subject of this sketch had but slight
educational advantages, being entirely self-taught until over twenty
years of age. He was apprenticed to the building trade at the age of
sixteen, developing marked talent as a mechanic. In 1836 he left
Quebec for New York, where he remained for four years. In 1838 he
married Eliza Jane Lamoreux, daughter of the late Abraham
Lamoreux, high constable of New York. In the same year he secured
his first schooling in the form of a six months’ course of drawing
lessons, during which he proved himself an apt and interested
scholar. In 1840 he returned to Quebec, where winter was just
setting in. Though possessed of little of this world’s goods, Mr. Peters
was not dismayed, but by dint of natural ability and hard work, soon
made a place for himself. In the winter of 1841-42 he finished his
scholastic education with a season’s course in the night classes of
the British-Canadian school, under the late Mr. Geggie. He also
employed his evenings, for seven years, learning vocal music, and
attained a good reputation as a tenor singer at St. Patrick’s Church,
and also at concerts for charitable objects. He found good friends in
the late Alexander Simpson, cashier of the Bank of Montreal, and
Rev. Mr. McMahon. His worldly affairs prospering, he was able to
take charge of his widowed mother, sister and four brothers. The
brothers became in turn apprenticed to him at the building trade. In
1853 he built a steam sash, door, and blind factory, the first ever
built in Quebec. This factory worked continuously until 1864, when it
was destroyed, together with a large quantity of lumber. The
proprietor’s loss was very heavy, as there was little insurance. Two
years later he built the present works on the corner of Grant and
Prince Edward streets, known as the St. Charles Steam Saw and
Planing Mills, blind, door, sash, box, and car factory, a large and
important industry. He constructed the joiner work of the first
steamer Quebec, and the steamer Union, plying on the river St.
Lawrence. Mr. Peters has reached the topmost round of success in
his profession, having been engaged in the construction of a great
variety of works, many of them most important. A mere catalogue of
some of the chief ones will serve to indicate the wide range of
contracts he has undertaken:—Upper Town market-house, gas
works, St. Paul street market-house, Wesleyan church, St. Peter’s
church, St. Sauveur church, Sisters of Charity church and buildings,
Masonic hall, Lévis Episcopal church, music hall, jail and court house
at St. Hyacinthe, and also at St. Thomas, Montmagny; Wellington
barracks, at Halifax, Nova Scotia; hotel at Tadousac, and the Earl of
Dufferin’s house, at the same place. He restored Quebec custom
house after the fire; built the wharf and light-house at Point St.
Laurent Island of Orleans; also the outer ballast wharf, and the
Louise embankment connected with the same, at the mouth of the
St. Charles river; the Allan wharf; also a large number of dwellings;
notably, Hamwood, Cataraqui, Elmsgrove, Bandon Lodge, Bijou,
Sans Bruit, and Sir George Stephens’ elegant house, at Grand Metis,
lined and finished inside with British Columbia cedar, brought over by
the Canadian Pacific Railway for the purpose. Of fourteen children
born, four sons and four daughters remain, all the daughters and
two of the sons being married. In religion, Mr. Peters is a Roman
Catholic. He has been for years vice-president of the Quebec and
Lake St. John Railway Company, as well as a member of the council
of the Quebec Board of Trade. He has been a member of St. Patrick’s
Society for over twenty-five years, and was its president for the year
1878-1879. He has won his success not by adventitious aids, but is
emphatically a self-made man, an honor to Canada, and to the race
from which he sprung.
Lawson, John A., Manager Post Office Money Order
Department, Charlottetown, Prince Edward Island, was born July
23rd, 1842, at Covehead, in that province, and belongs to one of its
oldest families. His great-great-grandfather, David Lawson, settled
there, coming from Scotland about 1770, his business being the
management of the Montgomery estate. David left two sons, and
from these spring the Lawsons of Prince Edward Island. The subject
of this sketch is the son of William David Lawson, and who lived on
the original homestead of the family, where also our subject was
born. William David married Isabella, daughter of John Auld, of
Covehead, also of Scotch extraction, and the issue of this union was
six boys and three girls. Four of the former are now living, the eldest
being Rev. S. G. Lawson, a minister of the Presbyterian church and
also well known in newspaper circles; Charles Lawson, a merchant of
Charlottetown; James D. Lawson, in the civil service, and our
subject. John A. received a good English education in the Common
and Normal schools of his native province, and upon reaching the
age of twenty-one years commenced the arduous life of a teacher,
which profession he followed till about twenty-four years of age. The
next five years he was engaged in mercantile pursuits, at
Mountstewart, relinquishing them only to accept the position which
he still holds under the Dominion Government, and which he has
filled for fifteen years. In 1864 Mr. Lawson joined the Independent
Order of Good Templars, and has always been an energetic and
consistent member of that organization. He has held the highest
positions in the gift of that body, being Grand Secretary from 1872
to 1884 inclusive. In 1885 he was elected Grand Chief Templar and
re-elected to that position in 1886. He is a member of the Masonic
craft, being initiated in Victoria Lodge, Charlottetown, in 1876, and
for six or seven successive years being its secretary. Politically, Mr.
Lawson is a Prohibitionist, although originally belonging to the
Conservative party. In religious matters Mr. Lawson has for many
years taken an active interest, being identified with the church of his
fathers, viz., the Presbyterian, and is an elder in the church he
attends. Our subject married in 1865 Sophia, daughter of Charles
Coffin, of Savage Harbour, of United Empire Loyalist stock, the family
settling in Prince Edward Island about 1780. His family consists of
nine children, two boys and seven girls, none of whom have yet
arrived at man’s or woman’s estate. Mr. Lawson is a man of kindly
disposition, quiet habits, and generous hospitality, consequently he
is a general favourite with all who know him.

Tyrwhitt, Lieut.-Col. Richard, Bradford, Ontario, M.P.


for South Simcoe, was born in Simcoe county, Ontario, on the 29th
of November, 1844. He is of an old English family, his grandfather,
whose name he bears, last of Nantyr Hall, Denbighshire, barrister of
the Inner Temple, and recorder of Chester. The subject of this sketch
was educated at home, under private tutors, until well advanced in
the rudimentary branches, and at Barrie Grammar School. He was
sent to France to complete his education in the best college there.
He spent some years as a collegian at Dinan and Rouen, returning to
Canada at the age of eighteen. He engaged in farming, and having
the advantage of health, education, and capital, besides an
enthusiastic liking for the profession, he has been successful. At the
age of twenty-six Mr. Tyrwhitt married Emma Whitaker, second
daughter of the former provost of Trinity College. At an early age Mr.
Tyrwhitt took an interest in military affairs, and joined the Simcoe
(35th) Battalion. In 1864 he took a first-class certificate at the
military school, Toronto; in January, 1865, attended the cadet camp
at Laprairie, and in 1866 served on the Niagara frontier, during the
Fenian raid, as lieutenant. He also took a first-class certificate at the
cavalry school, under Colonel Jenyns, in 1870. He soon attained the
rank of major, with the brevet rank of lieutenant-colonel; is now
lieutenant-colonel of the 36th Peel battalion, and commanded the
Wimbledon team in 1886. On the death of W. C. Little, who had
represented South Simcoe for years, Lieutenant-Colonel Tyrwhitt was
nominated by the Liberal-Conservatives as a candidate for the House
of Commons, and was returned by a majority of 900. The
Redistribution Act of 1882 so changed the boundaries of South
Simcoe that, instead of being, as it had formerly been, a
Conservative stronghold, it became a most evenly balanced
constituency. Nevertheless, Lieutenant-Colonel Tyrwhitt’s personal
popularity, and his clean record, won for him a second time the
confidence of the electors. In parliament he proved himself a most
painstaking and conscientious representative. When the second
North-West rebellion broke out, Lieutenant-Colonel Tyrwhitt was
among the first to offer his services to the government to assist in
suppressing the outbreak. Though doubtless, had he so desired, he
might have been named to the command of a battalion, he proved
that his sole desire was to serve his country and not to gain
applause, by acting as second in command of the York-Simcoe
battalion, of which his parliamentary colleague, Lieutenant-Colonel
O’Brien, was in command. His soldier-like conduct during the
campaign won for Lieutenant-Colonel Tyrwhitt the praise of his
superiors in rank, and the enthusiastic regard of his men. In the
general election of 1887, so great was the popularity of Lieutenant-
Colonel Tyrwhitt that not only was he nominated to contest his own
riding of South Simcoe, but he was deemed the strongest man to
contest North York against Mr. Mulock, one of the ablest and most
popular men on the Liberal side. Though he was unsuccessful in
North York, Lieutenant-Colonel Tyrwhitt carried his own riding by a
majority of 1050. There is no man in the House of Commons who is
regarded by both friends and foes as more fair-minded, independent
and patriotic than Mr. Tyrwhitt. Though a strong partisan, all believe
that his course is dictated by conscientious conviction, and an
earnest desire to serve the best interests of the country.

Smith, Robert Herbert, of the city of Quebec, is the


eldest son of the Rev. Robert Hopton Smith and Jane his wife, who
was a daughter of Robert Chapman, of London, England. Mr. Smith
was born in the year 1825, at Little Berkhampstead, England, and
had the advantages of a private education. In 1851 he came to
Canada, and six years afterwards was admitted as a partner into the
lumber shipping firm of Benson & Co. Three years later the name of
the firm was changed to Roberts, Smith & Co., and again, in 1880,
to Smith, Wade & Co. Six years later, Mr. Smith retired from
business. In 1869 Mr. Smith was appointed by the Dominion
Government a member of the Board of Protestant School
Commissioners for the city of Quebec, and in 1870 he received the
appointment of warden of the Trinity House in the same city. Mr.
Smith has taken an active interest in many benevolent enterprises.
Chief among these is St. George’s Society, of which he is a life
member, and of which society he was president during the years
1883 and 1884. In 1857 he was married to Amelia Jane, fourth
daughter of Henry LeMesurier, of Quebec. He is a member of the
Church of England, and at present fills several important public and
other offices. He is a member of the Quebec Harbour Commission, a
director of the Quebec Bank, and is also chairman of the Quebec
Gas Company.

Jennings, Rev. John, D.D., was born at Glasgow,


Scotland, in October, 1814. He was the only son of John Jennings,
manufacturer, of that city. His parents having died when he was two
years of age, his earlier education was received under his uncle, the
Rev. John Tindal, of Rathillet, Fifeshire. In early life he showed a
great liking for the study of medicine and theology, and entered
upon a theological course at St. Andrew’s University, and completed
it at the University of Edinburgh. As he determined upon laboring in
a foreign field, he further equipped himself by taking a complete
course in medicine. In 1838 he was appointed missionary to Canada
by the United Presbyterian Church of Cupar. Before setting out for
his field of labor he was married, in the same year, to Margaret
Cumming, daughter of Robert Cumming, of St. Boswell’s. Arriving in
Toronto, the young clergyman was not long in looking about for a
congregation. The city of Toronto at that time consisted of about
eleven thousand inhabitants. His congregation was at first naturally
small, consisting of seven members and twenty-one adherents, and
their first place of worship was in a carpenter’s workshop on
Newgate (now Adelaide) street. Over this congregation he was
inducted as the pastor of the First United Presbyterian church of
Toronto, the congregation residing principally to the east of Yonge
street and south of Queen street. The growth of the congregation
was rapid, and soon they purchased the old Baptist church on
Stanley street, but required shortly to find larger premises, and
obtained possession of a church built on Richmond street west
(close to Yonge street). In a few years still larger premises were
required, and the brick church on Bay street was erected, and
continued for thirty-six years to be occupied by the same
congregation, under his uninterrupted pastorate. In addition to the
pastorate of Bay Street Church, Mr. Jennings had arduous labors to
perform throughout the western and northern portions of the
province as missionary, especially in establishing new stations and
preaching to the scattered settlers. In these itinerant labors he had
to encounter many difficulties and hardships, but his strong physical
frame greatly strengthened him to bear these toils in the cause he
held so dear. His knowledge of medicine was an invaluable assistant
to him, and many of the scattered settlers were benefited bodily as
well as spiritually. One year’s record shows that he travelled in these
missionary tours upwards of three thousand miles, almost entirely in
the saddle. In acknowledgment of his labors, and several works that
he wrote on theological and university subjects, the degree of
Doctor of Divinity was conferred on him by the University of New
York—the first degree given to a Canadian minister. He was at last
obliged, through failing health, to resign his charge as pastor of Bay
Street Church, which he had held for thirty-six consecutive years.
The congregation reluctantly consented, and manifested its
appreciation of the long services he had rendered their church by
settling a liberal life-long allowance upon him. Notwithstanding the
many and continuous calls upon his time during his long pastorate,
Doctor Jennings found time to devote himself to assisting in building
up many of the public institutions of the city, more especially in
connection with the educational system, and for many years he was
a member of the senate of the University and Upper Canada College,
Council of Public Instruction and High School Board. He was one of
the foremost on the platform and in the press in the discussion
which led to the secularization, in 1854, of the clergy reserves, and
was also a principal mover in the schemes for the union of the
different branches of the Presbyterian church. He was gifted with a
winning, cordial disposition; was a clear, forcible preacher, liberal in
church and sectarian matters, which made him universally popular
with his fellow-citizens of all creeds. His visits to the sick-bed and
family circle were especially acceptable. He was fond of all healthy
amusements, especially outdoor sports, his own early athletic
training having assisted in building up a strong constitution, which in
after years stood him in good stead. After the resignation of his
charge his health failed rapidly, and in February, 1876, he
succumbed to an attack of paralysis, maintaining to the last all his
senses. His wife, three sons and four daughters survive him.

Slack, Edward, Waterloo, Quebec, was born at Eaton,


Quebec, on the 17th August, 1841, and is a son of the Rev. George
Slack, of London, England. Unlike most clergymen, Mr. Slack’s father
has passed a very adventurous career. Before he was ordained he
was an officer in the British Navy, and was in the service of the
Queen of Portugal during the insurrection of 1830. He was in the
battle of Cape St. Vincent on the 5th July, 1833, and for his gallantry
on that occasion received the Order of the Tower and Sword of
Portugal. He afterwards returned to England, and in 1837 retired
from the navy. He then put into operation a project he had formed
of coming to Canada. Shortly afterwards, however, he returned
again to England to be married to Emma Colston, of Epsom, a niece
of General Sir Edward Howarth, baronet, K.C.B. The newly married
couple then left England to take up their permanent residence in
Canada. Arriving, they remained for some time at Eaton, Quebec,
where Mr. Slack was ordained by the late Bishop Mountain, of
Quebec, and after removing to different places they finally settled
down at Bedford, of which district the Rev. Mr. Slack became Rural
Dean. His son, the subject of our sketch, received his education at
Bishop’s College, Lennoxville, where he took a classical course. A
true chip of the old block, he joined one of the Volunteer forces and
served as lieutenant at Niagara in the Trent affair. He again saw
active service during the Fenian raid, and also took part in the battle
of Pigeon Hill, on the Missisquoi frontier. He has occupied at different
times as many as seventeen municipal and public offices. He has
been mayor of Waterloo for eight years, and a member of the
council for over twenty. He is at present warden of Shefford county,
a position which he has held for a number of years, and is also a
director of the Waterloo and Magog, and the Stanstead, Shefford
and Chambly Railroads. He is a member of the Church of England,
and is thoroughly independent in politics. His wife is Marion A. Ellis,
daughter of the late R. A. Ellis, of Waterloo, Quebec. They were
married on the 20th September, 1864, and have seven children.

Hudspeth, Adam, Q.C., M.P., Lindsay, Ontario, was born in


Cobourg, Ont., on the 8th of December, 1836. He received his
education in the Grammar School of his native town, under the
tuition of his father, who was head-master. He studied law, and was
called to the bar in 1867. A year later he married Harriette Miles,
daughter of R. S. Miles, of Brockville, a retired chief factor of the
Hudson’s Bay Company. Mr. Hudspeth soon made his mark as a
lawyer and acquired a large practice. He was also, from early
manhood, a keen politician and did yeoman service for his party (the
Conservative) in all the political contests of his district for many
years. In 1875 he received the nomination of his party for the local
legislature and fought a hard fight against heavy odds, and though
not successful, he won the respect of opponents as well as the
admiration of friends by the manly earnestness of his campaign.
Though giving much attention to politics, Mr. Hudspeth advanced
rapidly in his profession and some years ago became a bencher of
the Law Society of Ontario. Mr. Hudspeth was deputy judge for the
county of Victoria for many years, being entrusted also with the
duties of revising officer under the Franchise Act of 1885 to prepare
the lists for North Victoria. Although complaints were made by the
Liberals of the action of revising officers in different parts of the
country, those complaints being all the more bitter because of the
fierce opposition which had been offered to the Franchise Bill in
parliament, no such complaints were made of the manner in which
the lists for North Victoria were prepared, both sides acknowledging
that a strict even-handed justice was meted out in every case. When
the election came on Mr. Hudspeth ran as the Conservative
candidate in South Victoria. He was elected by a handsome majority;
but it was supposed that he was disqualified under the
Independence of Parliament Act. Thereupon he resigned his office as
revising officer and again entered the contest. The fight was one of
the fiercest that has ever been known, even in Victoria, where party
spirit is strong, but the result was another victory for Mr. Hudspeth.
The victor was able to take his seat during the first session of the
new parliament, being received with enthusiastic plaudits on being
introduced to Mr. Speaker. His friends regard his entry into
parliamentary life as the fitting result of a long political education
gained in the field of active contests and as the real opening of a
brilliant career. Undoubtedly Mr. Hudspeth’s talents were far above
the average, and his remarkable energy and force of character are
certain to bring those talents into prominence that the possessor of
them will be called upon to take a high place among the
representatives of the people.

Morrison, Alfred Gidney, Barrister, Halifax, was born


on 31st May, 1854, at Folly village, Londonderry, in the county of
Colchester, Nova Scotia. His parents were Thomas Fletcher Morrison
and Margaret Brown Fletcher. On his father’s side he is descended
from the ancient family of Morrisons of the West coast of Scotland,
who were present in Ireland and took part in the defence of Derry.
From thence they came to New Hampshire, and from there to
Londonderry and Truro, in the county of Colchester, in the year
1760. On the mother’s side he is descended from the Rev. John
Brown, who was a native of Scotland, and one of the pioneers of the
Presbyterian church of Nova Scotia. Rev. Mr. Brown was the
associate of the late Dr. McGregor, the founder of Pictou academy,
one of the leading educational institutions in eastern Nova Scotia.
Mr. Morrison received his primary education at the common school in
his native village; and when a mere lad happened one day to go into
the court house at Truro, and hearing two distinguished members of
the bar wrangling over a disputed point, he, on returning to his
home, announced his determination to be a lawyer. Although years
elapsed before he could carry out this cherished idea, he at length
succeeded in getting a chance to study this profession. He removed
to Halifax in 1878, and after taking a course at Pictou academy, he
studied law for a short time in the Halifax Law School, which was
then newly established, and afterwards read law with Weatherby &
Graham, barristers, and Thompson & Graham, barristers, Halifax,
and was admitted to the bar of Nova Scotia in December, 1882. He
immediately afterwards entered into a partnership with W. F.
MacCoy, Q.C., but three years afterwards he joined the firm of
MacCoy, Pearson, Morrison & Forbes, which firm now does a large
business in Halifax. From 1870 until 1879 he held the position of
deputy surveyor of shipping at Londonderry. In 1884 he acted as
secretary to a provincial delegation to Ottawa; and was solicitor for
the Board of Public Charities at Halifax until the board was abolished
by the legislature in 1886. He helped in the establishment of a
system of printing cases for argument before the court in banc; and
also in the establishment of a law school at Halifax. He was
connected with the press for two years, and in this connection
assisted in promoting several important public enterprises. Mr.
Morrison believes in open and free discussion, and always likes to
see the best man win. He has been, since 1878, a leading member
of the Young Men’s Liberal Club at Halifax, and takes an active part
in politics. He is considered a good campaign platform speaker, and
has taken an interest in all election contests since 1878. He is
familiar with the maritime provinces; but has only been able, so far,
to visit Ottawa and the New England states. He was brought up a
Presbyterian, and his mind has undergone no important theological
change from youth up. Mr. Morrison’s progress has been upward in
his profession. He is a man of sound judgment, excellent address,
diligent in business, and possessed of an untarnished reputation for
integrity. He is very fond of literature, but unfortunately his legal
business gives him little time to indulge this taste, to any great
extent, in this direction. He was married on the 7th February, 1884,
to Rubie F. Douglas, of Maitland, in the county of Halifax, who is a
lady of good education and refined taste. She was for some years,
previous to her marriage, engaged in educational work, of which she
is particularly fond. She was educated at the Truro Normal School.
One son has been born of this union.

Matheson, Lieut.-Colonel Arthur James, fifth


son of the late Col. the Hon. Roderick Matheson, Senator, was born
at Perth, Ontario, and educated at Upper Canada College, and Trinity
College, Toronto. He was called to the Bar of Ontario in February,
1870. In March, 1866, he was gazetted lieutenant of the Perth
Infantry company, with which he served in the provisional battalion
at Brockville and Prescott on the St. Lawrence frontier during the
first Fenian raid. In November, 1866, on the formation of the 42nd
battalion, he was gazetted captain. Having resigned his commission
while studying his profession in Toronto, he was afterwards re-
appointed captain, and in 1885, major, and on 18th June, 1886,
lieut.-col. of the 42nd battalion V. M. The services of the battalion
were volunteered for the North-West during the rebellion but were
not required. Lieut.-Col. Matheson was, for a number of years, a
member of the town council, and for two years, 1883 and 1884,
mayor of Perth. In politics he is a Conservative.

Angus, Richard Bladworth, Montreal, Director of the


Canadian Pacific Railway Company, is a Scotchman by birth, having
been born at Bathgate, in the neighbourhood of the city of
Edinburgh, Scotland, on the 28th day of May, 1830. He is one of four
brothers, all remarkable for the early developed brilliancy of their
talents. Mr. Angus received his scholastic education in the academy
at Bathgate, and at an early age left Scotland and went to England,
where, in a bank in Manchester, he received his business training.
Bound to push his fortune, he came to Canada in 1857, and found a
situation in the Bank of Montreal. In the first series of this work in
connection with the life of the late Mr. C. F. Smithers, a brief concise
sketch is given of the early history of banking in Canada, with
especial reference to the great Bank of Montreal, of which that
regretted financier had for several years the direction. It was with
the progress of the same important institution that the subject of
this memoir was destined to be identified during some of the most
active years of his busy life, like not a few of the Scotchmen who
have made their mark on this side of the Atlantic, Mr. Angus had his
business training in one of the great commercial centres of England.
The qualities which were ultimately to win him the confidence of his
colleagues in some of the grandest enterprises of the time were
soon recognized in the young Manchester clerk, and he rapidly
mounted the ladder of promotion. In three years he had risen to the
post of accountant, and in 1861 was sent to Chicago to assume
charge of the branch office in that city. After some years residence in
Chicago, he was entrusted with a still larger responsibility, being
appointed to the associate management of the New York agency; a
year later we find him once more in Montreal, as manager of the
local business, and having discharged the critical business of that
position for five years, he succeeded Mr. King, in 1869, as general
manager. His tenure of that high position was marked by tact,
foresight, and the fullest appreciation of opportunities for extending
the influence of the institution. In 1876 he resigned, in order to
accept the vice-presidency of the St. Paul’s, Minneapolis and
Manitoba Railway, a step which in due time was to have important
results. It will be remembered that, as in the east, the entrance of
the Maritime provinces into the Canadian Confederation necessitated
the construction of the Intercolonial Railway. So in the extreme west,
the admission of British Columbia was effected solely on the
condition that communication should be established between the
Pacific region and the rest of the Dominion. It was one of the
grandest enterprises that had ever been conceived in an age fertile
in great undertakings. In 1871 the survey was begun, but the
scheme was to undergo many modifications before the actual
initiation of the work of construction. It was finally deemed most
advisable on various grounds that the responsibility should be
assumed, not by the Government, but by a private company. At last
a syndicate was formed, with Mr. (now Sir) George Stephen as its
leading spirit. Mr. Angus was one of the original body, and has
remained in connection with the incorporate company ever since as
one of its directors. He shares, therefore, in the glory, as he has
shared in the responsibilities and risks, of a public work, which has
revolutionised the relations of the distant parts of the British empire,
and enhanced a hundredfold the prospects of Canada as to
immigration, industry and commerce. Not, indeed, till the present
generation has passed away will the world sufficiently appreciate the
services of the men by whom the Canadian Pacific Railway was
completed, an all-through route from ocean to ocean on British
territory and a band of union between the metropolis and the
farthest east, without which Imperial unity would be little more than
a name. Mr. Angus is regarded as a shrewd business man, and very
strict in his dealings. He is, however, none the less popular, as he
has many amiable qualities, being a typical instance of that dual
nature which is not uncommon, especially among Scotchmen,
combining rigid adherence to the letter of a bargain, and close
calculation of expenditure in business matters, with open-handed
generosity in social intercourse. He is a member of the St. Andrew’s
Society, and holds the position of vice-president. He is also a
member of St. Paul’s lodge of Free Masons.

Jones, Robert Vonclure, A.M., Ph.D., Professor of


Classics, Acadia College, Wolfville, Nova Scotia, was born on June
25, 1835, at Pownal, lot 49, Prince Edward Island. His father was
William Jones, who was born in London, Great Britain, and
emigrated with his parents to Prince Edward Island about the
beginning of the present century. His mother was Mary Gay, who
came with her parents from the state of Maine, United States, and
settled in Prince Edward Island, about 1802. After leaving the
common schools, Mr. Jones pursued a course of study in the Central
Academy, Charlottetown, P.E.I. This school has since received the
more ambitious title of Prince of Wales College. It was then, as now,
a place of thorough drill, and in it faithful pupils could lay the
foundation of a broad and sound scholarship. He went, at the
beginning of 1855, to Horton Collegiate Academy to continue his
studies; and was matriculated into Acadia College, Wolfville, Nova
Scotia, in 1856. He graduated in 1860, and was a member of the
class that included the names of Professors Hartt and Wells, and
Drs. Rand and Alward. He continued his studies at Oxford University,
England, after his appointment to Acadia College; and was for four
years second master of Horton Collegiate Academy. He was
appointed to the chair of classics in Acadia College in 1865, and this
position he still holds. For some years he was one of the classical
examiners to the University of Halifax. Mr. Jones has travelled quite
extensively in England, Scotland, France, Switzerland, Italy, and in
some of the New England States. In religion he is a Baptist, and at
the Baptist convention, held in the Baptist church, Charlottetown,
Prince Edward Island, August 20th, 1887, he was unanimously
elected president. He was married on June 8, 1865, to Emma R.
Pineo, daughter of John O. Pineo, a well-known resident of Wolfville,
Kings county.

Macdonald, Hon. Andrew Archibald, Lieutenant-


Governor of Prince Edward Island, Charlottetown, was born at Three
Rivers, in that province, on the 14th February, 1829. He is the eldest
son of Hugh Macdonald, and Catherine Macdonald, his wife, and
grandson of Andrew Macdonald, who purchased an estate of ten
thousand acres in Prince Edward Island, in the early part of the
century, and with his family and some fifty of his countrymen, whom
he brought with him to settle on the property, emigrated from
Inverness-shire, Scotland, to Prince Edward Island where his
kinsman, Macdonald of Glenaladale and other relations had already
taken up their abode. Shortly after his arrival in the province he
likewise purchased the beautiful island of Panmure, seven hundred
acres in extent, at the entrance of Cardigan bay. There he erected a
dwelling-house and store and took up his residence. He set apart a
suitable piece of land for a church, which was soon built with the
assistance of a few settlers of the same faith, and there all would
assemble on the Sundays for united prayer, or to join in offering the
holy sacrifice of the mass at such rare intervals as a priest visited the
district. The interior of the island was then covered with the primeval
forest, unbroken by roads. The first settlers located along the
borders of the seashore or by the river margin. The water was the
great highway at all seasons. Snowshoes were as indispensable in
winter as canoes were in summer, for the snowfall was much greater
then than in later years, since the forest has been cleared. The firm
of Andrew Macdonald & Sons at once established an extensive
business in exporting the pine timber of the province to Great
Britain, and importing such goods as the settlers required. They also
extended a branch of the house to Miramichi, in New Brunswick.
They experienced all the usual difficulties of early settlers in a new
country, but we will only note a few somewhat different from the
ordinary kind. In 1807, while the first ship they had chartered was
loading, a sloop of war arrived from Halifax, and pressed the crew
for the King’s service. No seamen could be had to replace them, and
the ship and cargo were detained for a long time. Other ship-
owners, fearing the same fate, would not accept colonial charters,
and provincial trade was at a standstill, but Mr. Macdonald
represented the matter so well to the government that the practice
was soon discontinued, and business went on. At another time, as
the old man and one of his younger sons were taking passage home
to Britain, in the autumn, by a timber-laden ship, she was captured
by an American privateer, and taken as a prize to Philadelphia,
where he and his son were confined in jail for some months as
prisoners. As they were unable to communicate with their friends
and were without funds, they suffered great hardship, and endured
such privation that the old gentleman’s health gave way, he was
then allowed a limited liberty on parole. In the following spring he
managed to acquaint his friends with his situation, and the attention
of the Provincial government being called to the case, they obtained
his liberation and he returned home. In 1817 the house at Panmure
with every thing it contained, including valuable family papers, was
destroyed by fire, the inmates barely escaping with their lives; but
undaunted still, he imported brick and material from Britain and
erected the first brick dwelling-house and stables ever seen in that
part of the province. His original purchase of township lands had
proved a very unfortunate one, as it involved him in a Chancery suit,
which continued up to the time of his death, in 1833. His son, Hugh,
succeeded to the property, and continued the suit for almost another
generation, with the usual result in the Chancery suits of that period,
the litigants were ruined and the whole estate swallowed up in costs.
Hugh Macdonald, of Panmure, was one of the first Roman Catholics
appointed to any office of importance after the passage of the
Catholic Emancipation Act. He was high sheriff of the province in
1834. A commissioner of the Small Debt Court and justice of the
peace for Kings county; represented Georgetown for some time in
the House of Assembly; held the imperial appointment of Controller
of Customs and Navigation Laws, and was Collector of Customs at
Three Rivers, P.E.I., from 1832 until his death, in 1857. He was
succeeded by his eldest son, Andrew Archibald Macdonald, the
subject of our sketch, who was educated at the public schools of the
county and by private tutors. He first entered as a clerk in a general
store, opened at Georgetown, P.E.I., by a relative, in 1844, and soon
became a partner in the business. On the death of the senior
member of the firm in 1851, he purchased the estate, continued the
business, embarked largely in the fisheries, and took his two
brothers into partnership. The firm became large buyers and
exporters of the products of the province, and engaged extensively
in shipbuilding. In 1871 he removed with his family to
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like