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

Variety of Documents Describing Our Prediction Market Math Graphically #388

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

pwdel
Copy link
Member

@pwdel pwdel commented Nov 3, 2024

Additions to the Documentation Describing How our Math Works in Graphical / PDF Format

@pwdel pwdel self-assigned this Nov 3, 2024
@astrosnat
Copy link
Collaborator

astrosnat commented Nov 3, 2024

  1. Page 1: I would define I_initial and P_initial in the "Initial Investment" and "Initial Probability" bullet points.
  2. Page 4: Is it better or bettor? (I think both are used in British English)

Other than that, I understand what is going on here. So, yay, good stuff, will approve once the changes are made. Will one of the math readmes point to this pdf?

@pwdel pwdel marked this pull request as draft November 4, 2024 17:23
Copy link
Collaborator

@astrosnat astrosnat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add an introductory paragraph in each PDF explaining the specific scenario you're going to illustrate. Otherwise it'll be harder for readers to follow

@pwdel
Copy link
Member Author

pwdel commented Nov 5, 2024

  1. Page 1: I would define I_initial and P_initial in the "Initial Investment" and "Initial Probability" bullet points.
  2. Page 4: Is it better or bettor? (I think both are used in British English)

Other than that, I understand what is going on here. So, yay, good stuff, will approve once the changes are made. Will one of the math readmes point to this pdf?

@astrosnat

Will do.

Currently I have everything in Overleaf in different files so as not to lose work and I will plan on merging everything together and writing descriptive language so it all flows as one paper. I will also dump all of the actual LaTeX used to generate the paper at the end as well.

image

Copy link
Collaborator

@astrosnat astrosnat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some nitpicking on the TeX document, mostly to do with readability of individual sentences, but the overall structure of the document is solid and the graphics are very helpful

@@ -0,0 +1,1379 @@
\documentclass{article}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for including the TeX file also - this really helps with readability + commentability

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry about this but I'm authoring this document in Overleaf. So it's hard for me to intake the code from Github and copy and paste it back into Overleaf and then maintain it on Github again but I will try. What might be better is to hold off on edits until we have the final math and paper figured out, then go through a final revision. However comments along the way are appreciated and I can update the document to reflect comments, it's just that code changes are a bit harder to keep straight.

\maketitle

\section{Overview}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 3 items are good. I think Overall Purpose and Transparency and Unit Testing can be made more concise - e.g.

This document describes how market pricing (probability) gets set and how points get distributed from a series of historical bets. It aims to be clear and provide graphical illustrations.

Pricing and distribution underpin this software. Making the full algorithm understandable is essential to writing proper unit tests and clear documentation.

Just in general, short sentences + active voice

\section{First Transaction}

\begin{itemize}
\item \textbf{Initial Investment:} Every market is assumed to have an initial investment of at least 1. This investment comes from a fee assessed to the market creator. This initial investment goes both in the numerator and denominator of the probability calculation.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "assessed to the market creator" mean?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A fee is charged to the person who created the market

\section*{Calculating Course Payouts}

\begin{itemize}
\item \textbf{Course Payouts:} The purpose of the Course Payouts is to create a relationship between the probability, which is a float, rational positive numbers, and shares, which are of type int64, integers. We use a linear weight for each historical bet in the history of the market to create a reward factor.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This first item can be made clearer and more concise

\begin{itemize}
\item \textbf{Fourth Transaction:}
\begin{itemize}
\item We can now see the effects of the course payout on scaling toward older transactions. While both Bet 2 and Bet 3 were of equal amounts, because Bet 2 was made at at a point when the YES outcome was less likely based upon the price, there is proportionally more weight given to this bet.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the second sentence clearer and split it up.

e.g. While Bet 2 and Bet 3 were the same size, Bet 2 was made at a point when the YES outcome was less likely. Therefore we assign proportionally more weight to Bet 2.

\item \textbf{Fourth Transaction:}
\begin{itemize}
\item We can now see the effects of the course payout on scaling toward older transactions. While both Bet 2 and Bet 3 were of equal amounts, because Bet 2 was made at at a point when the YES outcome was less likely based upon the price, there is proportionally more weight given to this bet.
\item The fourth bet is a negative amount because it was a sale. Because the fourth bet occurs at the resolution price R, the Scaled Payout is zero. However in a future transaction, the Scaled Payout for this transaction could become negative, which would reduce the user's final payout, because they are no longer participating in the market at this amount.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This third sentence is loooooong and should be split into 2

e.g. In a future transaction, the Scaled Payout could become negative. This would reduce the user's final payout because [and then the last clause needs to be made clearer]

@pwdel pwdel linked an issue Nov 11, 2024 that may be closed by this pull request
@pwdel pwdel marked this pull request as ready for review November 11, 2024 19:42
\section{Conventions}

\begin{itemize}
\item \textbf{Course Payouts Divide By Zero Condition:} When Course Payouts calculations and further calculations derived from Course Payouts may include an inf (divide by zero) condition, we will define the output as zero. This situation arises in which the Market Value is measured as zero, since everyone has exited the market. Technically the market Value is still equal to the initial investment value until the resolution has been fulfilled, so the Course Payouts, which simply represent a link between the probability and the payout at a given market condition, are not representative of the final state of the market. Thus, calling the Course Payouts and anything calculated from the Course Payouts zero makes sense.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it "Market Value" or "market value"?


\begin{itemize}
\item \textbf{Course Payouts:} The purpose of the Course Payouts is to create a relationship between the probability, which is a float, rational positive numbers, and shares, which are of type int64, integers. We use a linear weight for each historical bet in the history of the market to create a reward factor.
\item \textbf{Reward Factor:} Course payouts are calculated in two steps, first by calculating a reward factor \(d_i\), which is the distance from the current probability of the market \(R\), and the probability at which the bet was made \(p_i\).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this whole section was much clearer, I really liked it


\section*{Normalization Factor Calculation for Third Transaction}

\subsection*{Step Three: Calculate Normalization Factor}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in general, how many significant figures do we use for shares, probabilities and normalization factors? Should a) state these explicitly b) keep them consistent


where each normalized market position is represented as:

\[
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a text wrapping error here in the PDF and the normalized market position is unreadable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improved Mathematics Documentation for Calculation of User Positions
2 participants