Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Python for Finance
Python for Finance

Python for Finance: Apply powerful finance models and quantitative analysis with Python , Second Edition

eBook
₹799 ₹3276.99
Paperback
₹4096.99
Subscription
Free Trial
Renews at ₹800p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Python for Finance

Chapter 2. Introduction to Python Modules

In this chapter, we will discuss the most important issues related to Python modules, which are packages written by experts or any individual to serve a special purpose. In this book, we will use about a dozen modules in total. Thus, knowledge related to modules is critical in our understanding of Python and its application to finance. In particular, in this chapter, we will cover the following topics:

  • Introduction to Python modules
  • Introduction to NumPy
  • Introduction to SciPy
  • Introduction to matplotlib
  • Introduction to statsmodels
  • Introduction to pandas
  • Python modules related to finance
  • Introduction to the pandas_reader module
  • Two financial calculators written in Python
  • How to install a Python module
  • Module dependency

What is a Python module?

A module is a package or group of programs that is written by an expert, user, or even a beginner who is usually very good in a specific area, to serve a specific purpose.

For example, a Python module called quant is for quantitative financial analysis. quant combines two modules of SciPy and DomainModel. The module contains a domain model that has exchanges, symbols, markets, and historical prices, among other things. Modules are very important in Python. In this book, we will discuss about a dozen modules implicitly or explicitly. In particular, we will explain five modules in detail: NumPy, SciPy, matplotlib, statsmodels, and Pandas.

Note

As of November 16, 2016, there are 92,872 Python modules (packages) with different areas available according to the Python Package Index.

For the financial and insurance industries, there are 384 modules currently available.

Assume that we want to estimate the square root of 3 by using the sqrt() function. However, after issuing...

Introduction to NumPy

In the following examples, the np.size() function from NumPy shows the number of data items of an array, and the np.std() function is used to calculate standard deviation:

>>>import numpy as np
>>>x= np.array([[1,2,3],[3,4,6]])     # 2 by 3 matrix
>>>np.size(x)                         # number of data items
6
>>>np.size(x,1)                       # show number of columns
3
>>>np.std(x)
1.5723301886761005
>>>np.std(x,1)
Array([ 0.81649658, 1.24721913]
>>>total=x.sum()                      # attention to the format
>>>z=np.random.rand(50)               #50 random obs from [0.0, 1)
>>>y=np.random.normal(size=100)       # from standard normal
>>>r=np.array(range(0,100),float)/100 # from 0, .01,to .99

Compared with a Python array, a NumPy array is a contiguous piece of memory that is passed directly to LAPACK, which is a software library for numerical linear algebra under the hood, so...

Introduction to SciPy

The following are a few examples based on the functions enclosed in the SciPy module. The sp.npv() function estimates the present values for a given set of cash flows with the first cash flow happening at time zero. The first input value is the discount rate, and the second input is an array of all cash flows.

The following is one example. Note that the sp.npv() function is different from the Excel npv() function. We will explain why this is so in Chapter 3, Time Value of Money:

>>>import scipy as sp
>>>cashflows=[-100,50,40,20,10,50]
>>>x=sp.npv(0.1,cashflows)
>>>round(x,2)
>>>31.41

The sp.pmt() function is used to answer the following question.

What is the monthly cash flow to pay off a mortgage of $250,000 over 30 years with an annual percentage rate (APR) of 4.5 percent, compounded monthly? The following code shows the answer:

>>>payment=sp.pmt(0.045/12,30*12,250000)
>>>round(payment,2)
-1266.71

Based on...

Introduction to matplotlib

Graphs and other visual representations have become more important in explaining many complex financial concepts, trading strategies, and formulas.

In this section, we discuss the matplotlib module, which is used to create various types of graphs. In addition, the module will be used intensively in Chapter 10, Options and Futures, when we discuss the famous Black-Scholes-Merton option model and various trading strategies. The matplotlib module is designed to produce publication-quality figures and graphs. The matplotlib module depends on NumPy and SciPy, which were discussed in the previous sections. To save generated graphs, there are several output formats available, such as PDF, Postscript, SVG, and PNG.

How to install matplotlib

If Python was installed by using the Anaconda super package, then matplotlib is preinstalled already. After launching Spyder, type the following line to test. If there is no error, it means that we have imported/uploaded the module successfully...

Introduction to statsmodels

statsmodels is a powerful Python package for many types of statistical analysis. Again, if Python was installed via Anaconda, then the module was installed at the same time. In statistics, ordinary least square (OLS) regression is a method for estimating the unknown parameters in a linear regression model. It minimizes the sum of squared vertical distances between the observed values and the values predicted by the linear approximation. The OLS method is used extensively in finance. Assume that we have the following equation, where y is an n by 1 vector (array), and x is an n by (m+1) matrix, a return matrix (n by m), plus a vector that contains 1 only. n is the number of observations, and m is the number of independent variables:

Introduction to statsmodels

In the following program, after generating the x and y vectors, we run an OLS regression (a linear regression). The x and y are artificial data. The last line prints the parameters only (the intercept is 1.28571420 and the slope is...

Introduction to pandas

The pandas module is a powerful tool used to process various types of data, including economics, financial, and accounting data. If Python was installed on your machine via Anaconda, then the pandas module was installed already. If you issue the following command without any error, it indicates that the pandas module was installed:

>>>import pandas as pd

In the following example, we generate two time series starting from January 1, 2013. The names of those two time series (columns) are A and B:

import numpy as np
import pandas as pd
dates=pd.date_range('20160101',periods=5)
np.random.seed(12345)
x=pd.DataFrame(np.random.rand(5,2),index=dates,columns=('A','B'))

First, we import both NumPy and pandas modules. The pd.date_range() function is used to generate an index array. The x variable is a pandas DataFrame with dates as its index. Later in this chapter, we will discuss the pd.DataFrame() function. The columns() function defines...

Python modules related to finance

Since this book is applying Python to finance, the modules (packages) related to finance will be our first priority.

The following table presents about a dozen Python modules or submodules related to finance:

Name

Description

Numpy.lib.financial

Many functions for corporate finance and financial management.

pandas_datareader

Retrieves data from Google, Yahoo! Finance, FRED, Fama-French factors.

googlefinance

Python module to get real-time (no delay) stock data from Google Finance API.

yahoo-finance

Python module to get stock data from Yahoo! Finance.

Python_finance

Download and analyze Yahoo! Finance data and develop trading strategies.

tstockquote

Retrieves stock quote data from Yahoo! Finance.

finance

Financial risk calculations. Optimized for ease of use through class construction and operator overload.

quant

Enterprise architecture for quantitative analysis in finance.

tradingmachine

A backtester for financial...

Introduction to the pandas_reader module

Via this module, users can download various economics and financial via Yahoo! Finance, Google Finance, Federal Reserve Economics Data (FRED), and Fama-French factors.

Assume that the pandas_reader module is installed. For detail on how to install this module, see the How to install a Python module section. First, let's look at the simplest example, just two lines to get IBM's trading data; see the following:

import pandas_datareader.data as web
df=web.get_data_google("ibm")

We could use a dot head and dot tail to show part of the results; see the following code:

>>> df.head()
>>> 
                  Open        High         Low       Close   Volume  
Date                                                                  
2010-01-04  131.179993  132.970001  130.850006  132.449997  6155300   
2010-01-05  131.679993  131.850006  130.100006  130.850006  6841400   
2010-01-06  130.679993  131.490005  129.809998  130.000000...

Two financial calculators

In the next chapter, many basic financial concepts and formulas will be introduced and discussed. Usually, when taking corporate finance or financial management, students rely on either Excel or a financial calculator to conduct their estimations. Since Python is the computational tool, a financial calculator written in Python would definitely enhance our understanding of both finance and Python.

Here is the first financial calculator, written in Python, from Numpy.lib.financial; see the following code:

>>> import numpy.lib.financial as fin
>>> dir(fin)
['__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '_convert_when', '_g_div_gp', '_rbl', '_when_to_num', 'absolute_import', 'division', 'fv', 'ipmt', 'irr&apos...

How to install a Python module

If Python was installed via Anaconda, there is a good chance that many of the modules discussed in this book have been installed together with Python. If Python was installed independently, users could use PyPi to install or update.

For example, we are interested in installing NumPy. On Windows, we have the following code:

python -m pip install -U pip numpy

If Python.exe is on the path, we could open a DOS window first, then issue the preceding line. If Python.exe is not on the path, we open a DOS window, then move to the location of the Python.exe file; for an example, see the following screenshot:

How to install a Python module

For a Mac, we have the following codes. Sometimes, after running the preceding command, you might receive the following message asking for an update of PiP:

How to install a Python module

The command line to update pip is given here:

python –m pip install –upgrade pip

See the result shown in the following screenshot:

How to install a Python module

To install NumPy independently, on Linux or OS X, we issue the following...

Module dependency

At the very beginning of this book, we argued that one of the advantages of using Python is that it is a rich source of hundreds of special packages called modules.

To avoid duplicated efforts and to save time in developing new modules, later modules choose to use functions developed on early modules; that is, they depend on early modules.

The advantage is obvious because developers can save lots of time and effort when building and testing a new module. However, one disadvantage is that installation becomes difficult.

There are two competing approaches:

  • The first approach is to bundle everything together and make sure that all parts play together nicely, thus avoiding the pain of installing n packages independently. This is wonderful, assuming that it works. A potential issue is that the updating of individual modules might not be reflected in the super package.
  • The second approach is to use minimal dependencies. It causes fewer headaches for the package maintainer, but for...

Exercises

  1. Do we have to install NumPy independently if our Python was installed via Anaconda?
  2. What are the advantages of using a super package to install many modules simultaneously?
  3. How do you find all the functions contained in NumPy or SciPy?
  4. How many ways are there to import a specific function contained in SciPy?
  5. What is wrong with the following operation?
    >>>x=[1,2,3]
    >>>x.sum()
  6. How can we print all the data items for a given array?
  7. What is wrong with the following lines of code?
    >>>import np
    >>>x=np.array([True,false,true,false],bool)
  8. Find out the meaning of skewtest included in the stats submodule (SciPy), and give an example of using this function.
  9. What is the difference between an arithmetic mean and a geometric mean?
  10. Debug the following lines of code, which are used to estimate a geometric mean for a given set of returns:
    >>>import scipy as sp
    >>>ret=np.array([0.05,0.11,-0.03])
    >>>pow(np.prod(ret+1),1/len(ret))-1
  11. Write a Python...

Summary

In this chapter, we have discussed one of the most important properties of Python: modules. A module is a package written by an expert or any individual to serve a special purpose. The knowledge related to modules is essential in our understanding of Python and its application to finance. In particular, we have introduced and discussed the most important modules, such as NumPy, SciPy, matplotlib, statsmodels, pandas, and pandas_reader. In addition, we have briefly mentioned module dependency and other issues. Two financial calculators written in Python were also presented. In Chapter 3, Time Value of Money, we will discuss many basic concepts associated with finance, such as the present value of one future cash flow, present value of perpetuity, present value of growing perpetuity, present value of annuity, and formulas related to future values. In addition, we will discuss definitions of Net Present Value (NPV), Internal Rate of Return (IRR), and Payback period. After that, several...

Left arrow icon Right arrow icon

Key benefits

  • Understand the fundamentals of Python data structures and work with time-series data
  • Implement key concepts in quantitative finance using popular Python libraries such as NumPy, SciPy, and matplotlib
  • A step-by-step tutorial packed with many Python programs that will help you learn how to apply Python to finance

Description

This book uses Python as its computational tool. Since Python is free, any school or organization can download and use it. This book is organized according to various finance subjects. In other words, the first edition focuses more on Python, while the second edition is truly trying to apply Python to finance. The book starts by explaining topics exclusively related to Python. Then we deal with critical parts of Python, explaining concepts such as time value of money stock and bond evaluations, capital asset pricing model, multi-factor models, time series analysis, portfolio theory, options and futures. This book will help us to learn or review the basics of quantitative finance and apply Python to solve various problems, such as estimating IBM’s market risk, running a Fama-French 3-factor, 5-factor, or Fama-French-Carhart 4 factor model, estimating the VaR of a 5-stock portfolio, estimating the optimal portfolio, and constructing the efficient frontier for a 20-stock portfolio with real-world stock, and with Monte Carlo Simulation. Later, we will also learn how to replicate the famous Black-Scholes-Merton option model and how to price exotic options such as the average price call option.

Who is this book for?

This book assumes that the readers have some basic knowledge related to Python. However, he/she has no knowledge of quantitative finance. In addition, he/she has no knowledge about financial data.

What you will learn

  • Become acquainted with Python in the first two chapters
  • Run CAPM, Fama-French 3-factor, and Fama-French-Carhart 4-factor models
  • Learn how to price a call, put, and several exotic options
  • Understand Monte Carlo simulation, how to write a Python program to
  • replicate the Black-Scholes-Merton options model, and how to price a few
  • exotic options
  • Understand the concept of volatility and how to test the hypothesis that
  • volatility changes over the years
  • Understand the ARCH and GARCH processes and how to write related
  • Python programs
Estimated delivery fee Deliver to India

Premium delivery 5 - 8 business days

₹630.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 30, 2017
Length: 586 pages
Edition : 2nd
Language : English
ISBN-13 : 9781787125698
Category :
Languages :
Concepts :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to India

Premium delivery 5 - 8 business days

₹630.95
(Includes tracking information)

Product Details

Publication date : Jun 30, 2017
Length: 586 pages
Edition : 2nd
Language : English
ISBN-13 : 9781787125698
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
₹800 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
₹4500 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₹400 each
Feature tick icon Exclusive print discounts
₹5000 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just ₹400 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 14,077.97
Python Machine Learning, Second Edition
₹3276.99
Python for Finance
₹4096.99
Python: End-to-end Data Analysis
₹6703.99
Total 14,077.97 Stars icon
Banner background image

Table of Contents

16 Chapters
1. Python Basics Chevron down icon Chevron up icon
2. Introduction to Python Modules Chevron down icon Chevron up icon
3. Time Value of Money Chevron down icon Chevron up icon
4. Sources of Data Chevron down icon Chevron up icon
5. Bond and Stock Valuation Chevron down icon Chevron up icon
6. Capital Asset Pricing Model Chevron down icon Chevron up icon
7. Multifactor Models and Performance Measures Chevron down icon Chevron up icon
8. Time-Series Analysis Chevron down icon Chevron up icon
9. Portfolio Theory Chevron down icon Chevron up icon
10. Options and Futures Chevron down icon Chevron up icon
11. Value at Risk Chevron down icon Chevron up icon
12. Monte Carlo Simulation Chevron down icon Chevron up icon
13. Credit Risk Analysis Chevron down icon Chevron up icon
14. Exotic Options Chevron down icon Chevron up icon
15. Volatility, Implied Volatility, ARCH, and GARCH Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.5
(33 Ratings)
5 star 39.4%
4 star 15.2%
3 star 15.2%
2 star 15.2%
1 star 15.2%
Filter icon Filter
Top Reviews

Filter reviews by




N/A Feb 07, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excellent ! Can be a good textbook.
Feefo Verified review Feefo
Daniele Feb 12, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Amazing book with many interesting examples. Completely worth it
Amazon Verified review Amazon
Ana Isabel Bezerra Cavalcanti Oct 15, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Atendeu às minhas expectativas, em termos de pesquisas atuais e futuras.
Amazon Verified review Amazon
Jamie Jul 06, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I bought this eBook (with source code) from Packt. Great intro to Finance using Python. Chapter 10 and 12 are especially helpful as an addition to Hull's Options, Futures and Other Derivatives.
Amazon Verified review Amazon
Jaime May 21, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
For the past 3 years I have been investing part of my time directing and managing SW financial implementations in parallel of providing consulting services on several industries leveraging my expertise on Data Advisory specifically data management, governance and analytics/big data.During this tenure I have implemented diverse strategies to support my teams having a quick and solid ramp up getting hands on using in several cases Python in an specific framework either for data management or solving complex financial challenges on tricky calculations.I have found this book a great overview and hands on guidance to who is in the Python learning path and has realized to focus its functionality and powerful use on problem solving in the Finance arena or Analytics for example.Taking in count Python is powerful, flexible, ad easy to learn, the author provides a good and strong basis to go from the basic use of Python calculating net present value to more complex financial problems like valuations, pricing options, Monte Carlo series usage and regressions. Even also the author shares guidance to interact with public data sources such as Yahoo! Finance or Google Finance.Last but not least the content of this book will provide guidance to create very useful graphs by using Matlotlib in a clear way.Enjoy your reading!Note: If you have no Finance background, I recommend reading this book getting access to electronic or printed dictionary or related finance terms reference.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela