LeonceNsh commited on
Commit
95eb1a8
·
verified ·
1 Parent(s): e39ca35

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +65 -1
README.md CHANGED
@@ -11,4 +11,68 @@ license: mit
11
  short_description: Technical charts of equities
12
  ---
13
 
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  short_description: Technical charts of equities
12
  ---
13
 
14
+ # Stock Analysis and Visualization Application
15
+
16
+ This application provides a comprehensive tool for fetching and visualizing historical stock data and technical indicators for selected companies. Using Yahoo Finance data, it allows users to analyze stocks through various technical indicators such as Simple Moving Averages (SMA), Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD), and Trailing Annual Returns.
17
+
18
+ ## Features
19
+
20
+ - **Fetch Historical Data**: Retrieve historical stock data and market capitalization using Yahoo Finance.
21
+ - **Technical Indicators**: Calculate and plot technical indicators including SMA, RSI, MACD, and Trailing Annual Returns.
22
+ - **Interactive Plots**: Visualize data with interactive plots using Gradio.
23
+ - **Asynchronous Data Fetching**: Efficiently fetch data asynchronously for improved performance.
24
+ - **Caching**: Utilize caching to store data with a Time-To-Live (TTL) of one day, reducing redundant data fetches.
25
+
26
+ ## Dependencies
27
+
28
+ - `yfinance`
29
+ - `matplotlib`
30
+ - `numpy`
31
+ - `concurrent.futures`
32
+ - `datetime`
33
+ - `PIL`
34
+ - `io`
35
+ - `gradio`
36
+ - `cachetools`
37
+ - `aiohttp`
38
+ - `asyncio`
39
+ - `pandas`
40
+
41
+ ## Usage
42
+
43
+ ### Installation
44
+
45
+ 1. Install required dependencies:
46
+ ```sh
47
+ pip install yfinance matplotlib numpy gradio cachetools aiohttp pandas
48
+ ```
49
+
50
+ ### Running the Application
51
+
52
+ 1. Execute the script to launch the Gradio app:
53
+ ```sh
54
+ python your_script_name.py
55
+ ```
56
+
57
+ 2. Access the Gradio interface in your web browser.
58
+
59
+ ### Gradio Interface
60
+
61
+ - **Select Companies**: Choose one or multiple companies from the provided list.
62
+ - **Select Indicators**: Choose one or multiple technical indicators to plot.
63
+ - **Select All Indicators**: Option to select or deselect all available technical indicators.
64
+ - **View Plots**: Interactive gallery to view and analyze the generated plots.
65
+
66
+ ## Example Workflow
67
+
68
+ 1. **Select Companies**: Choose companies such as Apple, Microsoft, and Amazon.
69
+ 2. **Select Indicators**: Choose technical indicators like SMA, RSI, or MACD.
70
+ 3. **Generate Plots**: View the generated plots in the interactive gallery, displaying the selected indicators for the chosen companies.
71
+
72
+ ## Code Overview
73
+
74
+ - **Global Configuration**: Define global settings and ticker mappings.
75
+ - **Data Fetching**: Functions to fetch historical stock data both synchronously and asynchronously.
76
+ - **Technical Indicator Calculation**: Functions to compute various technical indicators.
77
+ - **Plotting**: Functions to create and convert plots to images.
78
+ - **Gradio Interface**: Functions to launch and manage the Gradio interface for user interaction.