Reference
This module returns the most recent price of the selected company.
LivePriceDisplay
Returns the most recent price of the selected company.
Source code in src/live_price_display.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
display_final_price_av(company_name)
staticmethod
Returns a the price using Alpha Vantage.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
company_name |
str
|
The ticker symbol of the company |
required |
Returns:
Type | Description |
---|---|
Union[str, dict, Any]
|
The most recent price in string |
Source code in src/live_price_display.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
display_final_price_yf(company_name)
staticmethod
Returns the price of the selected company using Yahoo Finance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
company_name |
str
|
The ticker symbol of the company. |
required |
Returns:
Type | Description |
---|---|
Union[float, str]
|
The most recent price. |
Source code in src/live_price_display.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
|
This module displays the most recent news of the selected company if available
NewsDisplay
Returns the most recent news of the selected company, if any.
Source code in src/news_display.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|
format_news_django(company_name)
Formats the collected news to suit different django UI. Args: company_name: The ticker symbol of the company
Returns:
Name | Type | Description |
---|---|---|
five_article |
list
|
The most recent five articles |
Source code in src/news_display.py
49 50 51 52 53 54 55 56 57 58 59 |
|
format_news_pyqt(company_name)
Formats the collected news to suit different PyQt5 UI. Args: company_name: The ticker symbol of the company
Returns:
Name | Type | Description |
---|---|---|
five_article |
list
|
The most recent five articles |
Source code in src/news_display.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
This module processes raw data and returns processed data in required format.
Model
Processes data and returns data in required format
Source code in src/model.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
__init__()
Constructs all the necessary attributes to make the necessary connection to the database.
Returns:
Type | Description |
---|---|
None
|
None |
Source code in src/model.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|
check_headers_and_data(file, expected_headers)
Checks if each csv file has the expected headers and at least one data point for each header
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file |
str
|
The name of the file being checked |
required |
expected_headers |
list
|
The list of headers required |
required |
Returns:
Type | Description |
---|---|
bool
|
The results of the file |
Source code in src/model.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
|
generate_company_list()
Returns a list of companies.
Returns:
Type | Description |
---|---|
Tuple[list, list]
|
A list of companies. |
Source code in src/model.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
|
process_data()
Slices the data as required.
Returns:
Type | Description |
---|---|
Union[DataFrame, str]
|
A DataFrame containing required information of all companies. |
Source code in src/model.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|