An option is a derivative, a contract that gives the buyer the right, but not the obligation, to buy or sell the underlying asset by a certain date (expiration date) at a specified price (strike price).
There are two types of options: calls and puts. Traders can construct option strategies ranging from buying or selling a single option to very complex ones that involve multiple simultaneous option positions.
Option payoff diagrams are profit and loss charts that show the risk/reward profile of an option or combination of options. …
Mplfinance is a dedicated data visulization package from matlplotlib for visualizing financial data.
Mplfinance enable visualization of financial data in the form of different types of charts- Candlestick chart, Renko Chart, OHLC chart, Point and Figure chart etc. with very few lines of code.
Mplfinance also facilitates superimposing moving averages on top of charts for decision making by technical analysts.
Typical market data includes OHLCV(Open High Low Close Volume) data. The data can be obtained by using the sites of stock exchanges, financial publications, APIs, web-scrapping etc.
Mplfinace package can be used to plot any dataframe provided the following conditions…
In this article, we scout for the best alternative for the injured Reds defender Virgil Van Dijk.
The steps involved in the process is as follows:
All relevant player stats are collected from fbref.com
Key Performance indicators are created for evaluation of players
Data cleansing and feature engineering are performed
Finding the Players most Similar to VVD:
Players with KPIs similar to VVD can be found using proximity measures
Commenting on the findings of the excercise
Virgil van Dijk is arguably the most important player for the Reds. Since his arrival at Anfield…
How to Extract Key from Python Dictionary using Value
How to Add Text Labels to Scatterplot in Python (Matplotlib/Seaborn)
What is Quadrant Analysis & How to do it in Python
5 Methods to Check for NaN values in in Python
Yahoo! Finance Tutorial
Web3.py is a python library which can be used to interact with Ethereum blockchain.
This library has functions which modify the state of the blockchain(sending and authorizing transactions) as well as functions which does not change the state(Query in balance, details of blocks, transactions etc.).
Web3.py can be installed by using pip install command. The official documentation of the library is very informative and easy to understand.
pip install web3
Once the library is installed, it can be imported into the python script to use its features as below.
from web3 import Web3
Radar chart, also called as Spider chart or Web chart is a graphical method used for comparing multiple quantitative variables. It is a two dimensional polar visualization.
This is a tutorial on how to prepare a radar chart in python.
import numpy as np
import matplotlib.pyplot as pltplt.style.use('ggplot')
Note that I have set the style for matplotlib as ggplot, you set your favorite style or use the default style.
We will visualize the marks obtained by 2 students- Alice and Bob in five subjects…
Withe the rise in popularity of NFTs and crypto art, there is a rise in demand for programmers who can perform image manipulation and generate procedural art.
Pixel art has also seen a resurgence in popularity of late, especially among the connoisseurs of digital art.
In this article I will explain how to perform image manipulation in python to convert any photo into pixel art.
I will use a cropped version(800px X 800px ) of the above image for the purpose of demonstration.
import matplotlib.pyplot as plt
The following command can be used to read image using OpenCV.
This command reads the file photo.jpg located in the current folder and stores in memory as img.
Displaying image using OpenCV is not very straight forward. The following command can be used to display the photo.
When this command is executed, the below photo will open in a new window with title as…
QR codes are machine readable two dimensional pixelated barcodes which can be used to store a variety of information. QR in QR code stands for Quick Response.
QR code was invented by a Japanese engineer Masahiro Hara from automobile manufacturer Denso Wave in the year 1994 to track the movement of car parts.
QR Code has increased in popularity in the later 2010s with improvement in optical capabilities of mobile phones and their wide adoption.
Nowadays, QR codes are being used for wide variety of applications like, make online payments, check hotel menu, share wifi password, obtain price and other details of…
The Simple Mail Transfer Protocol (SMTP) is an internet standard communication protocol used for sending email.
YAGmail is a python package for automating Gmail. The package derives its name for Yet Another Gmail SMTP client.
The package can be install by using the below code.
You can check out the official documentation here.
pip install yagmail
Credentials of gmail- username and password have to be provided to create an SMTP client, it can be considered as logging in to your account.
Once SMTP client is created, we can send email to whichever valid email id.
All components required for…