Giter Site home page Giter Site logo

kyungphilleestockvaluator's Introduction

Stock Valuator: DCF Analysis and Trading Signals

Table of Contents

  1. Introduction
  2. Features
  3. Installation
  4. Usage
  5. API Endpoints
  6. Code Overview
  7. Contributing
  8. License

Introduction

This stock valuator is a Python web application that uses Flask to offer an API endpoint for Discounted Cash Flow (DCF) analysis. The application evaluates a given stock ticker to determine whether it's overvalued, undervalued, or fairly valued based on financial data fetched from Yahoo Finance.


Features

  • DCF Analysis: Performs DCF analysis using data like risk-free rate, cost of equity, and free cash flows.
  • WACC Calculation: Computes the Weighted Average Cost of Capital.
  • Terminal Value: Estimates the terminal value of the stock.
  • Trade Signal: Provides trading signals based on the DCF evaluation (Buy, Sell, or Hold).
  • Flask API: Offers a RESTful API endpoint to fetch valuation.
  • Web Interface: Simple web front-end for user input and output display.

Installation

  1. Clone the Repository

    git clone https://github.com/kyungphillee/kyungphilleestockvaluator.git
  2. Install Required Packages

    pip install -r requirements.txt
  3. Run the Application

    python app.py

Usage

  • Web Interface: Navigate to http://127.0.0.1:5000/ and enter the stock ticker. Click on "Get Valuation" to see the result.
  • API Endpoint: To get the valuation of a stock ticker, use the API endpoint /api/valuation?ticker=<ticker>.

API Endpoints

Endpoint Description
GET /api/valuation Returns the valuation of a stock

Example:

GET /api/valuation?ticker=AAPL

Code Overview

  • fetch_stock_data: Fetches necessary stock data from Yahoo Finance.
  • discount_rate: Calculates the discount rate based on equity, debt, and taxes.
  • cost_of_equity: Computes the cost of equity.
  • get_FCF: Gets the Free Cash Flow for the stock.
  • Terminal_Value: Calculates the Terminal Value.
  • DCF: Main function that performs the DCF analysis.
  • trade: Provides a trade recommendation based on the valuation.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.


For more details on the implementation and potential improvements, refer to inline comments in the code. Pull requests are welcome.

Disclaimer: This application is for educational purposes only. Please do your own due diligence before making any investment decisions.

kyungphilleestockvaluator's People

Contributors

kyungphillee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.