Learn R Programming

dispositionEffect

The dispositionEffect package allows to quickly evaluate the presence of disposition effect’s behaviors of an investor based solely on his transactions and the market prices of the traded assets.

Installation

You can install the released version of dispositionEffect from CRAN with:

install.packages("dispositionEffect")

Otherwise, you can also install the development version from GitHub with:

install.packages("devtools")
devtools::install_github("marcozanotti/dispositionEffect")

Overview

The package contains few user-friendly purpose specific interfaces:

  • portfolio_compute is a wrapper function that compute realized and paper gains and losses from the investor’s transactions and the market prices of the traded assets and updates the investor’s portfolio

  • gains_losses is the core function of the package. It performs all the necessary calculations and can be used for real-time processing (it is intended for advanced users only)

  • disposition_effect computes the disposition effect

  • disposition_difference computes the disposition difference

  • disposition_computeand disposition_summaryinterfaces that allow to easily compute disposition effect and summary statistics.

Tutorials

References

  • Mazzucchelli, 2022, An Analysis of Short Selling and Volatility Impact on the Disposition Effect (working paper)

  • Filippin, Mazzucchelli, and Zanotti, 2022, Portfolio driven disposition effect: the wide framing approach (working paper)

  • Mazzucchelli, and Zanotti, 2022, Mean reverting expectations to rationalize the disposition effect (working paper)

  • Computing Disposition Effect on Financial Market Data, 2021, useR! Conference

Getting help

If you encounter a clear bug, please file an issue with a minimal reproducible example on GitHub.

For questions and other discussion, mail us at zanottimarco17@gmail.com.

Acknowledgements

A special thank to Claud Graphics for our logo.

Copy Link

Version

Install

install.packages('dispositionEffect')

Monthly Downloads

208

Version

1.0.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Marco Zanotti

Last Published

May 30th, 2022

Functions in dispositionEffect (1.0.1)

investor

Sample investor financial transactions
closest_market_price

Closest market price
DEanalysis

Real sample data for Disposition Effect analysis
checks

Checks functions
initializers

Initializers functions
gains_losses

Gains & Losses
evaluate

Portfolio evaluation
difference_in_time

Difference in time
portfolio_results_ts

Realized and paper results
portfolio_results

Realized and paper results
manipulate_initial_data

Pre-process transactions and market prices data frames
portfolio_compute

Portfolio Compute
%>%

Pipe operator
marketprices

Market prices of assets traded by the sample investor
paper_compute

Papers' estimation
negative_match

Negative match operator
utils

Utilities
disposition_effect

Disposition Effect
realized_compute

Realized estimation
dispositionEffect-package

dispositionEffect: behavioral Analysis on Financial Data
updates

Update results over time