27 March 2021

Create a Watchdog in Python

 What is Watchdog in Python

Watchdog is a python module that can be used to monitor file system changes. As the name suggests this module observes the given directory and can notify if a file is created or changed.

Step 1: Import some Stuff

import os
import time
from watchdog.observers import Observer
from watchdog.events import PatternMatchingEventHandler

Step 2: Create the event handler


if __name__ == "__main__":
    # patterns = "*" # the file patterns we want to handle
    patterns = "*.csv" # choose only csv files
    ignore_patterns = ""
    ignore_directories = True
    case_sensitive = True
    # Create the event handler
    my_event_handler = PatternMatchingEventHandler(patterns, ignore_patterns, ignore_directories, case_sensitive)

20 March 2021

Installation of WordPress on localhost

Why install wordpress.org locally on your computer?

We can do all our testing on our local computer , one that doesn’t affect our live WordPress site.

Note: If you install WordPress locally on Windows, then the only person who can see that site is you. If you want to make a website that is available to the public, then you need to have a domain name and web hosting.


What do I need for running wordpress.org locally on my computer?

For Windows users, WampServer is the best way to start off with installation of wordspress.org on your computer? WAMP, is a compilation of Apache web server, PHP and MySQL bundled for Windows computers.

14 March 2021

A Primer to ib_insync - Interactive Brokers Part 8

Why ib_insync ?

While retrieving stock data for multiple symbols asynchronously from the TWS API provided by IB, I found the going a little steep. And here was ib_insync which made the task so very simple for me.

Pls. note that ib_insync is very different from the TWS API provided by IB. The TWS API is the official API created by IB while  ib_insync is created by a team of individuals headed by Guru Ji Ewald de Wit

08 March 2021

Developing a Trading System for TWS API - Interactive Brokers Part 7

What is a trading system?

It is a set of rules that can be based on technical indicators, quantitative methods, fundamental analysis or simply a mix of all or some of them.


What are the elements of a full fledged trading system that can be deployed in Production?

  • An Entry Point
  • A Stop Loss / Trailing Stop Loss
  • An Exit Point