Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Jupyter notebook for testing for OBV #83

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions docs/strategies/obv_crossover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

# OBV Crossover Strategy

## Overview

The OBV Crossover strategy is designed to generate trading signals based on the On-Balance Volume (OBV) indicator. It utilizes the OBV line and Exponential Moving Average of OBV (OBV_EMA) to make informed entry and exit decisions.

## On-Balance Volume (OBV) Indicator

In the world of technical analysis, the On-Balance Volume (OBV) indicator is a tool used to assess the strength and direction of a price trend. Unlike traditional price-based indicators, OBV focuses on the volume of trading activity. Here's how it works:

- When the closing price of a security is higher than the previous day's closing price, the OBV increases by the trading volume of that day.

- When the closing price is lower than the previous day's closing price, the OBV decreases by the trading volume.

- When the closing price remains the same, the OBV remains unchanged.

The OBV line is cumulative, which means it adds or subtracts volume based on whether the price closes higher or lower than the previous day. High OBV values indicate strong buying volume, suggesting a bullish trend, while low OBV values indicate strong selling volume, suggesting a bearish trend.

## Strategy Parameters

The following parameters can be configured for the OBV Crossover strategy:

- **EMATimePeriod**: The time period for calculating the Exponential Moving Average (EMA) of OBV.

## Crossover Calculation

The core of the strategy lies in the crossover between the OBV line and the OBV_EMA. Here's how the crossover calculation works:

- Calculate the OBV values for a given instrument based on historical data.

- Calculate the Exponential Moving Average (EMA) of OBV using the specified `EMATimePeriod`.

- Determine the crossover of OBV and OBV_EMA.

- Generate entry and exit signals based on the crossovers. When OBV crosses above OBV_EMA, it may suggest a bullish trend, and when it crosses below, it may indicate a bearish trend.

## Risk and Considerations

The OBV Crossover strategy, like any other technical analysis-based approach, comes with certain risks and considerations:

- It relies on historical volume data, so its effectiveness can vary depending on market conditions and data accuracy.

- It is essential to perform backtesting to assess the strategy's performance before using it in real trading.

- Always employ risk management techniques and consider other forms of analysis to make well-informed trading decisions.

This strategy provides a framework for using the OBV indicator to make trading decisions. It's crucial to adapt and test the strategy in your specific trading environment and consider any additional parameters or filters that might improve its performance.
Loading