Build a stock charting tool in Python -- 2
Budget: $30 – $250 AUD
I require a script written in Python 3, to help provide a visual summary for a day-trader's performance
Key requirements
A) Stock price to be charted, with Green and Red dots to be overlayed onto chart, to highlight buys/sells
B) Traded volume for a stock to be charted
C) Cumulative stock position to be charted
D) Cumulative profit/loss to be charted
See attachment "expected output" for what I'm expecting as a result.
Python script to output this as 1 jpg file
This script will take 2 sets of input arrays
1) An array containing stock purchases.
This array will contain columns for "Buy or Sell", Volume, Price, Value and Trade DateTime.
Please see "input 1" for an example set of data.
2) An array containing timeseries data for the price of the stock.
This array will contain columns for Date, Time, Open, High, Low, Close, and Volume. This data will be provided in 1 minute intervals.
Please see "input 2" for an example set of data.
Chart A)
stock price data will come from data in array 2. This data will need to plotted as "candlesticks" for each 1 minute interval.
Buys to be overlayed as Green dots. Sells as Red. If the same 1 minute interval contains both a buy and a sell, then both green/red dot should appear.
Points for each dot will be sourced from array 1.
Chart B)
Traded volume will come from array 1. Needs to be plotted directly below chart A (or combined with), and x-axis must be in-line with chart A)
Chart C)
Cumulative stock position data will come from parsing Array 1. Our position will start at 0, and then we increment for every buy, and decrement for every sell, based on the "volume" column in array 1. This calculation is to be performed for each 1 minute interval provided in Array 1. If no data for an interval, then no change to the cumulative position.
Chart D)
Cumulative profit/Loss will be calculated for each minute by calculating the "cash position", and then adding the "value of the stock position".
Cash position to be calculated by subtracting all buy "value" from array 1, and adding all sell "value".
stock position to be calculated by adding all the buy "volume" from array 1, and subtracting all the sell "volume". Then, the value of this stock position to be calculated by multiplying the corresponding "Close" price from array 2.
I have this code logic written in an excel file - for this project, I just need this logic rewritten into Python, please ask for this and I can provide the example excel logic. Note - for all posts, please let me know what charting library you intend to use for this, so I we can easily filter out the copy-paste responses. charting lib will need to be opensource/free to use. Please also advise how you intend to generate the jpg image (e.g. python library to be used, and if other libraries may be used: selenium, phantom, etc)
Key requirements
A) Stock price to be charted, with Green and Red dots to be overlayed onto chart, to highlight buys/sells
B) Traded volume for a stock to be charted
C) Cumulative stock position to be charted
D) Cumulative profit/loss to be charted
See attachment "expected output" for what I'm expecting as a result.
Python script to output this as 1 jpg file
This script will take 2 sets of input arrays
1) An array containing stock purchases.
This array will contain columns for "Buy or Sell", Volume, Price, Value and Trade DateTime.
Please see "input 1" for an example set of data.
2) An array containing timeseries data for the price of the stock.
This array will contain columns for Date, Time, Open, High, Low, Close, and Volume. This data will be provided in 1 minute intervals.
Please see "input 2" for an example set of data.
Chart A)
stock price data will come from data in array 2. This data will need to plotted as "candlesticks" for each 1 minute interval.
Buys to be overlayed as Green dots. Sells as Red. If the same 1 minute interval contains both a buy and a sell, then both green/red dot should appear.
Points for each dot will be sourced from array 1.
Chart B)
Traded volume will come from array 1. Needs to be plotted directly below chart A (or combined with), and x-axis must be in-line with chart A)
Chart C)
Cumulative stock position data will come from parsing Array 1. Our position will start at 0, and then we increment for every buy, and decrement for every sell, based on the "volume" column in array 1. This calculation is to be performed for each 1 minute interval provided in Array 1. If no data for an interval, then no change to the cumulative position.
Chart D)
Cumulative profit/Loss will be calculated for each minute by calculating the "cash position", and then adding the "value of the stock position".
Cash position to be calculated by subtracting all buy "value" from array 1, and adding all sell "value".
stock position to be calculated by adding all the buy "volume" from array 1, and subtracting all the sell "volume". Then, the value of this stock position to be calculated by multiplying the corresponding "Close" price from array 2.
I have this code logic written in an excel file - for this project, I just need this logic rewritten into Python, please ask for this and I can provide the example excel logic. Note - for all posts, please let me know what charting library you intend to use for this, so I we can easily filter out the copy-paste responses. charting lib will need to be opensource/free to use. Please also advise how you intend to generate the jpg image (e.g. python library to be used, and if other libraries may be used: selenium, phantom, etc)