Archive

Archive for July 7, 2020

Python: Shares Speculation System – P1

July 7, 2020 6 comments


Learning : Python, SQL, SQlite,
Subject: Plan, Design and Build a Shares Speculation System (SSS)

Project Card:

Project Name: Shares Speculation System

First Draft on: 26.6.2020

Version: V01-26.6.2020

By: Ali

Brief: In this Project we will work on a Shares Speculation System (SSS) were the user can save transactions regarding his investments in the stock market.

The Project Idea: A person who works on Shares Speculation looking for a System to keep the records for his transactions and calculate the Profits and Return Of Investment ROI ratio based on Daily, Monthly or Yearly tansactions.

Scope of Work: We will use Python to writing the codes and will store the transactions in a DataBase using SQlite3.

System Tabels:
1. Shares_table (shares_name): To contain Shares Full Name and it’s Abbreviation.
2. Buy_Transactions_table (buy_t_table): To hold all buying transactions [Date, Share Name, Amount, Price, cost]
3. Sell_transaction_table (sell_t_table): To hold all selling transactions [Date, Share Name, Amount, Price, profit]
4. Budget_table (budget_t): To hold the budgets of the Shares Speculation [ Date, amount, notes
[Notes: With Budgets we can do two type of Transactions, Adding New budget will increases the Money to be Invested, also the user can withdrawal some amount of the money.]
5. Year_ROI (y_roi): After each year (end of the current year) there will be a function to be RUN and it will calculate the Total Investments, Budgets, Profits, Costs, ROI, Total Buy Transactions, Total Sell Transactions … maybe other all in one table and will store all this as a one line/record in the table.

System Functions:
For each table, we will have three main functions Add, Edit and Delete. Also we will write a Menu to access each Function and some Math/Economics formulas to calculate the Investments, Profits and ROI.

How the System Works:
The idea is, FIRST the user will create a Budget Profile, (Date, Budget Amount). Then each time the user buy or sell shares, the system will add a record saving the Transactions type and detail. If the Transaction is Buying then We will Debit the Transaction Total from the budget we have in the system
and if the transaction type is Selling we will Add the Income to the Budget.


:: Shares Speculation System ::

Part 1 Part 2 Part 3 Part 4



To Download my Python code (.py) files Click-Here




Follow me on Twitter..




By: Ali Radwani