Skip to main content

Posts

Showing posts from June, 2021

Python Code for Trading Indicators

Hi Everyone, I am back with some random things again. So today i will share codes of popular trading indicators which you can use while creating your own trader with machine learning in python. so at first you need to import the below libraries import numpy as np import pandas as pd from pandas_datareader import data as web import matplotlib.pyplot as plt then after the above step is done then you need to assign few of the local variables you can also take them as input as per your requirement stock_name="SBI" #for nifty: ^NSEI n = 20 #window size start_date = "2021-04-01" end_date = "2021-06-03" then after it is done you need to create a function which can be used to extract the data from the yahoo finance and for that the code is provided below def getData():     stock_data = web.DataReader(stock_name, start=start_date, end=end_date, data_source='yahoo')     stock_df=pd.DataFrame(stock_data)     return stock_df The above code will return da...

(for Beginers)Few points to remember while trading Options

Hi, I am back with some new random information which you might find useful if you are new to trading. I am sure this point will help you to grasp the market fast and avoid unexpected losses. Before knowing how to trade options first we need to know about the terminologies used in stock market options: CE = Call Options PE = Put Options Call or Long or Buy signifies upside. Put or Short or Sell signifies downside. in case of Buy order:- Nifty May 15500 CE = Nifty Staying above 15500.(you are betting that Nifty will stay above 15500 at the end of the trading session of last Thursday of May) Nifty May 14800 PE = Nifty Staying below 14800.(you are betting that Nifty will stay below 14800 at the end of the trading session of last Thursday of May) In case you are selling instead of buying then the meanings become opposite of above lines. If a date is present with them then it represents the last day of that options. Predicting NIFTY & NIFTY BANK that they will stay in a x and y...