Sign in

Data Analyst | Hacker | Financial Analyst | Freelancer | IIM MBA | Opensource | Democratize Knowledge | https://www.youtube.com/channel/UCLpBd4gzfIBXm2BPpdHOWdQ

Introduction

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.

Getting the data

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…


TL;DR

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:
Data Collection:
All relevant player stats are collected from fbref.com
KPI Generation:
Key Performance indicators are created for evaluation of players
Data Wrangling:
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
Conclusion:
Commenting on the findings of the excercise

Introduction

Virgil van Dijk is arguably the most important player for the Reds. Since his arrival at Anfield…


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.).

Install Package

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

Import Library

Once the library is installed, it can be imported into the python script to use its features as below.

from web3 import Web3

Connection to Ethereum Node

The package has to connected to an…


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 Libraries

We will be using Matplotlib library for visualization and NumPy library for several mathematical functions.

import numpy as np
import matplotlib.pyplot as plt
plt.style.use('ggplot')

Note that I have set the style for matplotlib as ggplot, you set your favorite style or use the default style.

Data for visualization

We will visualize the marks obtained by 2 students- Alice and Bob in five subjects…


Introduction

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.

Photo by Mika Baumeister on Unsplash

I will use a cropped version(800px X 800px ) of the above image for the purpose of demonstration.

Let the coding begin!

Libraries Required

We will use Pillow Library for image manipulation and Matplotlib library for displaying and saving images.

#Import…


Import Libraries

OpenCV is the only library which is needed for the project.
We will also be using matplotlib library for some visualizations which is discussed later.

import cv2
import matplotlib.pyplot as plt

Read Photo

The following command can be used to read image using OpenCV.

img=cv2.imread("photo.jpg")

This command reads the file photo.jpg located in the current folder and stores in memory as img.

Show Image using OpenCV

Displaying image using OpenCV is not very straight forward. The following command can be used to display the photo.

cv2.imshow(‘original image’,img)
cv2.waitKey(0)
cv2.destroyAllWindows()

When this command is executed, the below photo will open in a new window with title as…


What is QR code?

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.

Install package

The package can be install by using the below code.
You can check out the official documentation here.

pip install yagmail

Create SMTP client

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.

mailer=yagmail.SMTP(user=’USERNAME’, password=’PASSWORD’)

Send Mail

Once SMTP client is created, we can send email to whichever valid email id.
All components required for…

Abhijith Chandradas

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store