1. 0
    Covered Call Strategy using Machine LearningA covered call is used by an investor to make some small profit while holding the stock. Mostly the reason why a trader would want to create a covered call is because the trader is bullish on the underlying stoc...

    Covered Call Strategy using Machine Learning

    Covered Call Strategy using Machine Learning

    A covered call is used by an investor to make some small profit while holding the stock. Mostly the reason why a trader would want to create a covered call is because the trader is bullish on the underlying stock and wants to hold for long-term, but the stock doesn’t pay any dividend.The stock is expected to go up over a period of next 6 months, and in the meantime, you would want to use this stock as collateral and sell some call and pocket the premium. But there is a risk to the strategy, that is if the stock goes up then your stock would get called away at expiry. So, instead of waiting for the option to expire, you can buy it back for a lesser premium.

    In this blog, I will try to show you how you could benefit by using a simple decision tree algorithm to predict a short-term move in the option premium price and pocket the difference while holding the stock.

    For more details on different option trading strategies please visit https://quantra.quantinsti.com/

    Let me show you an example, using the Nifty futures. Nifty50 is an Indian Index comprising of 50 stocks from different sectors.

    To execute the above-discussed strategy, we assume that we are holding the futures contract and then we try to write a call option on the same underlying. To do this, we train a machine learning algorithm on the past data consisting of various greeks, such as IV, delta, gamma, vega, and theta of the option as the input. And the dependent variable or the prediction would be made on the next day’s return. We write the call whenever the algorithm generates a sell signal. To begin with, let us import the necessary libraries.

    Importing the Libraries

    import pandas as pd
    import mibian as mb
    from sklearn.metrics import accuracy_score
    from sklearn.tree import DecisionTreeClassifier
    import matplotlib.pyplot as plt
    import numpy as np

    Mibian is the library that I used to calculate the option greeks using the Black Scholes Model.

    First, let us import the data. I have two datasets, one with the continuous data of the Futures Contract and another with the continuous data of the 9000 strike call option. Hereby continuous I mean that is across various expiries.

    Importing the Data

    futures_data= pd.read_csv("Future_data.csv")
    options_data= pd.read_csv("Option_data.csv")

    The data in the csv file used in this blog is downloaded from the NSE website.
    Let us print the data sets to visualize them.

    options data

    futures data

    As you can see below, we have data starting from 26th of October for the futures data and 26th of November for the Options data. Let us analyse the length of the datasets we have.

    (Read more)

    1. 0
      Working Of Neural Networks For Stock Price PredictionIntroductionMachine learning has proved to improve efficiency significantly, and there are many jobs which have been replaced by smarter and faster machines using artificial intelligence or machine lear...

      Working Of Neural Networks For Stock Price Prediction

      Working of Neural Networks for Stock Price prediction

      Introduction

      Machine learning has proved to improve efficiency significantly, and there are many jobs which have been replaced by smarter and faster machines using artificial intelligence or machine learning. The stock markets are no exceptions to this. Today, there are several Machine Learning algorithms running in the live markets. These algorithms often provide greater returns than other alternate algorithms or sometimes even higher than experienced traders. In this article, I will talk about the concepts involved in a neural network and how it can be applied to predict stock prices in the live markets. Let us start by understanding what a neuron is.

      Neuron

      Neuron

      This is the neuron that you must be familiar with, well if you aren’t you should now be grateful that you can understand this because there are billions of neurons in your brain. There are three components to a neuron, the dendrites, the axon and the main body of the neuron. The dendrites are the receivers of the signal and the axon is the transmitter. Alone, a neuron is not of much use, but when it is connected to other neurons, it does several complicated computations and helps operate the most complicated machine on our planet, the human body.

      multiple neurons

      A computer neuron is built in a similar manner, as shown in the diagram. There are inputs to the neuron marked with yellow circles, and the neuron emits an output signal after some computation. The input layer resembles the dendrites of the neuron and the output signal is the axon. Each input signal is assigned a weight, wi. This weight is multiplied by the input value and the neuron stores the weighted sum of all the input variables. These weights are computed in the training phase of the neural network through concepts called gradient descent and back propagation, we will cover these topics in our subsequent blog posts on Neural Networks. An activation function is then applied to the weighted sum, which results in the output signal of the neuron. The input signals are generated by other neurons, i.e, the output of other neurons, and the network is built to make predictions/computations in this manner. This is the basic idea of a neural network. We will look at each of these concepts in more detail in this article.

      Working of Neural Networks

      We will look at an example to understand the working of neural networks. The input layer consists of the parameters that will help us arrive at an output value or make a prediction. Our brains essentially have five basic input parameters, which are our senses to touch, hear, see, smell and taste. The neurons in our brain create more complicated parameters such as emotions and feelings, from these basic input parameters. And our emotions and feelings, make us act or take decisions which is basically the output of the neural network of our brains. Therefore, there are two layers of computations in this case before making a decision.

      Read More here: https://www.quantinsti.com/blog/working-neural-networks-stock-price-prediction/


      1. 0
        We begin 2018 with so much to look forward to. With definitely the best yet to come, let’s take a look at what was fabulous in the year 2017. Here’s a collation of our ten most popularly read blogs from last year. Offering a summary of the trending topics...

        Top Quantitative and Algorithmic Trading Blogs of 2017

        We begin 2018 with so much to look forward to. With definitely the best yet to come, let’s take a look at what was fabulous in the year 2017. Here’s a collation of our ten most popularly read blogs from last year. Offering a summary of the trending topics from last year which is followed by a category-wise collection of the best reads from last year.

        1. Best 10 Blogs
        2. Algo Trading Basics
        3. Algo Trading Strategies and Indicators
        4. Tools and Platforms
        5. Career Advice

        Best 10 Blog

        1. Machine Learning For Trading – How To Predict Stock Prices Using Regression?

        This blog summarises why has Machine Learning become such a buzz word lately. The author gives you different scenarios where a computer programme comes across as a more befitting resource than a human mind. Machine Learning is being employed for long. In 1763, Thomas Bayes published a work ‘An Essay towards solving a Problem in the Doctrine of Chances’ which lead to ‘Bayes Rule’, one of the important algorithms used in Machine Learning. Today applications of Machine Learning are everywhere, this blog elaborates on the implementation of strategies like Linear Regression.

        2. Machine Learning Classification Strategy In Python

        This blog is a step by step guide on how to implement machine learning classification algorithm on S&P500 using Support Vector Classifier (SVC). SVCs are supervised learning classification models. The article will take you through the linear process of implementing the machine learning classification strategy in Python, which begins from importing the libraries, to fetching data and determining the target variable. The next step is the creation of variables to test and train dataset split and create the machine learning classification model using the train dataset.

        3. Top Algo Trading Platforms in India

        The advent of algorithmic trading has rewritten the rules of traditional broking. With significant volumes on the exchanges now being traded with the help of sophisticated algorithms, it is imperative that traders should be fully aware of the trading platforms that would enable them to implement their strategies and remain competitive. This write-up makes note of the top trading platforms and tools: Omnesys NEST, Presto ATS, ODIN, FLEXTRADE, AlgoNomics, MetaTrader, AmiBroker, NinjaTrader.

        4. Top 9 Cryptocurrency Trading Platforms

        The article covers 9 Best Cryptocurrency Exchanges: eToro, Kraken, Poloniex, BitFinex, HitBTC, Bittrex, BitMEX, Coinbase and Localbitcoins. Cryptocurrency trading has gained substantial popularity owing to many logical aspects. The concept of Cryptocurrency is based on knowledge-sharing on a distributed platform. The entire transaction is for everyone to see. The data entered cannot be altered, nor can it be removed, enabling a system of complete transparency and trust. The entire money flow for the working model is beyond the traditional practices and hence the rising interest in the subject. Read on to know how to be a part of the bandwagon.

        5. Algorithmic Trading Strategies, Paradigms and Modelling Ideas

        After having learnt the basics of Algo Trading, acquiring the knowledge of trading strategies is the secondary level of education. An algorithm is just a set of instructions or rules. These set of rules are then used on a stock exchange to automate the execution of orders without human intervention. This concept is called Algorithmic Trading. The article further elaborates on some of the trading strategies.

        6. Top Courses after MBA Finance

        Even after the dramatic shift in the technological sphere, finance jobs are as much in-demand as roles in technology sector or other domains. MBA graduates in Finance are proving that they can make a difference as leaders in many different industries. This article lists top courses after MBA finance that students can take up to enhance their finance career.

        7. Build Technical Indicators in Python

        Technical Indicator is essentially a mathematical representation based on data sets such as price (high, low, open, close, etc.) or volume of a security to forecast price trends. There are several kinds of technical indicators that are used to analyze and detect the direction of movement of the price. This blog shall take you through a thorough description of the various indicators like EVM, Moving Average (MA), Rate of Change (ROC), Bollinger Bands, Force Index. Traders use them to study the short-term price movement since they do not prove very useful for long-term investors, read the full article to learn how to utilize the same for your own trades.

        8. Learn Algorithmic Trading: A Step by Step Guide

        With the boom in technological advancements in trading and financial market applications, algorithmic trading and high-frequency trading is being welcomed and accepted by exchanges all over the world. Within a decade, it is sure to be the most common way of trading in the developed markets. This article shall help you learn how to utilize algorithmics to trade markets profitably.

        9. Forecasting Markets using eXtreme Gradient Boosting (XGBoost)

        Numerous machine learning models like Linear/Logistic regression, Support Vector Machines, Neural Networks, Tree-based models etc. are being tried and applied in an attempt to analyze and forecast the markets. Researchers have found that some models have more success rate compared to other machine learning models. eXtreme Gradient Boosting also called XGBoost is one such machine learning model that has received rave from the machine learning practitioners. In this post, we covered the basics of XGBoost, a winning model for many kaggle competitions and attempted to develop an XGBoost stock forecasting model using the “xgboost” package in R programming.

        10. Essential Books on Algorithmic Trading

        A good starting point for an aspiring trader would be to pick up a good book, immerse oneself, and absorb all that the book has to offer. This post pens down core focus areas for aspiring quants and covers some of the good reads in each of those categories. The post also shares a comprehensive list of books considered must-reads for aspiring algo-traders.

        Algo Trading Basics

        Why You Should Be Doing Algorithmic Trading?

        This article elaborates on how accuracy of machines serves a miraculous purpose for High-Frequency Trading and why it is a smart move to adopt machines to take your financial decisions.

        Learn Algorithmic Trading: A Step by Step Guide

        With the boom in technological advancements in trading and financial market applications, algorithmic trading and high-frequency trading is being welcomed and accepted by exchanges all over the world. Read the full blog to acquire a step by step understanding of Algorithmic Trading.

        Setting-Up an Algo Trading Desk

        Domain knowledge, skilled resources, technology & infrastructure in the form of hardware and software are the basic requirements for setting up any business or start-up. This blog gives you an overview of the requirements for setting up an algorithmic trading desk or firm.

        How To Get Funding For Your Trading Strategy?

        If you’re keen on getting your strategy funded by someone, you’ll need to have at least 2 year’s worth of consistent profitable track record. Read on to know the perfect roadmap to get your trading strategy funded.

        Introduction To Market Making & High-Frequency Trading Strategies

        The blog offers an introduction to the basic functionalities of the market and market makers who are agents who stand ready to buy and sell securities in the financial markets. The rest of the market participants are therefore always guaranteed counterparty for their transactions. Explore the article to know more about the subject.

        What Is Market Microstructure?

        Markets microstructure deals with issues of market structure and design, price formation, price discovery, transaction and timing cost, information & disclosure, and investor behavior. It is the functional setup of a market functioning under a given set of rules & deals.

        The Growth & Future Of Algorithmic Trading

        Algorithmic trading is amongst the most talked about technologies in the recent years. It has given trading Firms more power in the rapidly evolving markets by eliminating human errors and changing the way Financial markets are interlinked today.

        An Algorithmic Trading Guide For Retail Traders

        If you are trading a strategy which is profitable for you, you need to be able to increase the number of profitable trades to earn more. In trading, the losses and wins happen together. You come out profitable only when your wins compensate your losses enough so as to account for your efforts and costs. Algorithmic trading is a way to do the same.

        (Read more: http://tinyurl.com/ya4u523h)

        1. 0
          Managing research work for commodities involves a day-to-day understanding and charting of the fluctuations in commodity prices. Considering the data that a research analyst pulls and manages every day, it is quite plausible that a commodity analyst is ei...

          From A Commodity Analyst To An Algorithmic Trader

          Managing research work for commodities involves a day-to-day understanding and charting of the fluctuations in commodity prices. Considering the data that a research analyst pulls and manages every day, it is quite plausible that a commodity analyst is either a trader already and if not he would be keen to start. A few years back trading commodities was not heard of much. Today the scenario is quite different; there are overall nineteen commodity centric exchanges in India and we see a good surge in commodity trading. The price fluctuation may not be drastic when considering commodities, but consider being able to apply intraday trading to the same. If you take a look at the charts representing price fluctuations for gold, you will observe a minute price variation on an hourly basis and a substantial one for a longer period. Consider, being able to leverage these minute fluctuations and monetize them for yourself.

          gold price graph

          Source: http://www.moneycontrol.com/commodity/gold-price.html

          The question that needs to be answered is how would you be able to monetize this price variation? Have you ever thought of trading via Algos? A yes would mean you are aware of the technical requirement. If the answer is no, let us take you through the basics of algorithmic trading first.

          What is Algo trading?

          Algorithmic trading (automated trading, black-box trading, or simply algo-trading) is the process of using computers programmed to follow a defined set of instructions for placing a trade in order to generate profits at a speed and frequency that is impossible for a human trader.

          How does Algo Trading function?

          Automated or Algorithmic trading is using computer programmes to generate trading signals, send orders and manage portfolios. Sophisticated electronic markets/platforms are used by the algorithms to trade in the similar fashion as done in electronic trading. The difference is that in algorithmic trading decisions about volume or size, timing and price are determined by the algorithm.

          High-Frequency Trading (HFT) is a special category of algorithmic trading characterized by unusually brief position-holding periods, low-latency response times, and high trading volumes in a day. Algorithms are written so as to utilize trading opportunities which appear in very brief time periods as short as milli or microseconds. The margin of each trade is small, which is compensated by high speed and large volumes.

          Why go for Algo-trading?

          Consider being able to minimize your losses to a minimum by automating the buying and selling process. Accuracy and speed of transaction are increased manifolds, increasing your profit margin in turn. Your comfort level is increased because you don’t have to fret about the prices of your trade falling or skyrocketing while you sleep. You can backtest your strategies on historical data to be more secure, hence adhering to better risk management. All of that with an additional advantage of emotional discipline while trading and at the best possible speed. All you would need to do is automate them.

          Here we have an example of a person who comes from the commodities market and is making the use of technology by having learned algorithmic trading. Mr. Vippinraj presently working as Regional Head -South for Reliance Commodities Limited, prior to that worked for Motilal Oswal in Commodity segment.

          When he opted to go for the Executive Program in Algorithmic Trading™ from QuantInsti®, he was aware of the functionalities of the market and had acquired a strong aptitude towards trading. Read on to know more about his experience.

          (Read More)

          1. 0
            The most interesting technological development of this era – cryptocurrency and the never-ending speculation of its value and future is at a high. The value of Bitcoin saw a steep hike in the last two months and the magic money has been flowing from the e...

            The most interesting technological development of this era – cryptocurrency and the never-ending speculation of its value and future is at a high. The value of Bitcoin saw a steep hike in the last two months and the magic money has been flowing from the elite finance enthusiasts to the common man. The rising popularity of Bitcoin has made it desirable and owned not only by early adopters but also by sceptics and laggards.

            Interested in exploring a couple of other cryptocurrencies besides Bitcoin? This article elaborates on Bitcoin and alternate options.

            Bitcoin

            bitcoin

            Value (01.01.2018)Launch YearDenominationDemographicsIssuance
            $ 13,843.90January 2009Millibitcoin, SatoshiWorldwideDecentralized

            Bitcoin, the cryptocurrency launched in January 2009 by Satoshi Nakamoto has become the most popular cryptocurrency of the time. As on 5th Jan’18, the market value of Bitcoin stands at $ 15,456.10. Even after a couple of setbacks, every other day there is a hike in the value.

            What makes Bitcoin the most popular cryptocurrency?
            To begin with, it was the first blockchain which provides complete transparency in the transactions and trading. The currency is not owned by any single governing body, it is owned by everyone who buys the currency. The numbers of coins available are exhaustive, 21,000,000 to be precise, hence the urgency and furore to own this cryptocurrency.

            Built on similar models and idea but lesser in value owing to one or the other reason, there is no dearth of cryptocurrencies today. Only a few have found good reception and circulation in the market. Elaborated below are our recommendations.

            Bitcoin Cash

            Bitcoin Cash

            Value (01.01.2018)Launch YearDenominationDemographicsIssuance
            $ 2,552.60August 2017SatoshiWorldwideDecentralized

            Bitcoin Cash (BCH) was created by the occurrence of a fork in one of the Bitcoin blocks 478,559. The fork created two separate coins, Bitcoin and Bitcoin Cash. There is a vast difference in the value of the two currencies because BCH is a separate coin. There are chances that this may develop into a more popular currency than Bitcoin but as of now it’s considered as an alternate option.

            Ethereum Classic

            Ethereum

            Value (01.01.2018)Launch YearDenominationDemographicsIssuance
            $ 36.55July 2015Smallest -wei, Each denomination has its own nameWorldwideDecentralized

            Ethereum also called ‘Gas’ is an open-source cryptocurrency. As compared to Bitcoin, Ethereum is considered as relatively less stable. Ethereum aims to incorporate number of transactions and units than Bitcoin. Ethereum’s coin value is Ether and its primary differentiating factor is its technology.

            Litecoin

            Litecoin

            Value (01.01.2018)Launch YearDenominationDemographicsIssuance
            $ 254.95October 2011Lites, photonsWorldwideDecentralized

            Litecoin is the fourth most popular cryptocurrency. In the similar fashion as Bitcoin, Litecoin also has an open book ledger. The main difference between the two is the speed. The speed of processing Litecoin transactions is four times faster than that for Bitcoin. However, lack of availability of the currency is one of the primary reasons for the comparative lack in surge of value for this currency. The currency has recently been made available to trade on Coinbase which led to an eventual surge in the value.

            (Read More)

            1. 0
              By Viraj Bhagat Faster than a speeding trade Able to leap obstacles in a single instance Stronger than manual trading Is it a bird? Is it a plane? No!...

              7 Things You Didn’t Know About Algorithmic TradingBy Viraj Bhagat

              Faster than a speeding trade
              Able to leap obstacles in a single instance
              Stronger than manual trading
              Is it a bird?
              Is it a plane?
              No!
              It’s Algorithmic Trading!

              Introduction

              Fast, reliable and relentless, Algorithmic trading has taken the world by storm, it is the next step in the evolution of trading, the trading technology of tomorrow.

              Fact: The Algorithmic Trading market is growing at a CAGR of 10.3% says the Global Algorithmic Trading Market Report 2016-2020. As of today, around 75% of the trades done globally are automated and Algorithmic Trading contributes a major share of it as reported by the Economic Times.

              Time and again Algo Trading has had to prove its mettle to earn a place in trading in exchanges across the globe and clear many obstacles to gain acceptance from the world. This is largely due to the fact that people are reluctant to easily accept new technologies, especially those which would automate work and eliminate the use of manpower.

              There are a few beliefs, disbeliefs and rumors that stop people from making the best out of Algo Trading and it is about time, everyone realized it’s true potential.

              Thus, we bring you 7 things that we believe everyone should know about Algorithmic Trading.

              Did you know! There is no age barrier to train for a career in Algo Trading

              so-youre-saying-i-can-be-a-quant-too

              People often undermine their abilities to perform and often think low of themselves wondering if they would be able to trade at a later stage in their life. Some say they are old, or they cannot cope up with the technology. But, these are just reasons if you are not willing enough to break out of that shell of old-fashioned manual trading methods.

              If someone actually wants to achieve, then they need to have that will, competence, drive and the necessary skills to go ahead no matter what. Don’t let your age or your profession stop you from Trading! There are numerous examples out there, and one such success story is of this 40-year-old Quant who overcame all odds to succeed. His story inspires to just GO FOR IT!

              Are you aware that there are many career and job opportunities out there for Algo Professionals?

              studied-algorithmic-trading-landed-a-job-as-a-quant

              Every role is crucial for the firm to succeed. There are various job opportunities on positions like Algo Dealer, Analysts, Data Scientists, Strategists, etc.

              Programmers have taken up Algorithmic Trading and have successfully achieved some landmarks in their careers. High Frequency Trading jobs often come with higher salary packages. Many independent Traders have established their own Algorithmic Trading Desks and are reaping the benefits from the same. Learn how you too can set up your very own Trading Desk here.

              Entrepreneurial ventures are a thing today, and Traders are vying to establish their own firms which have spelt success for many of them. A relative example of this is that of Derek and Maxime, finance experts from two different nationalities who helm a successful business today.

              It Takes Time. Like wine, it gets better with time

              Algo Trading Takes Time. Like wine, it gets better with timeIt is not advisable to pick up an Algo Trading crash course in a couple of months. Mastering Algo Trading takes years of practice and experience, your skills matter and following a structured approach is necessary, which is offered by Institute like ours.
              Unlike the previous practices of trading by calling out rates, broker dependency, and the carry-forward systems, today there are open systems, online trading, derivatives and algorithms. Coupled with increased governance by regulatory authorities, trading has become swift and competitive.

              Trading will grow into something more fruitful and astonishing and with newer technologies like Cryptocurrency, Blockchains, Artificial Intelligence, Machine Learning, etc. who knows where it would lead us. Afterall, it is only a matter of time.

              (Read More)

              154
              threads
              32
              followers
              About This Board
              A board that you can share economy news or share/discuss anything related to economy and economics.