Podcast
Questions and Answers
In the present tense, what is the ending for regular -AR verbs for 'yo'?
In the present tense, what is the ending for regular -AR verbs for 'yo'?
- -o (correct)
- -an
- -as
- -a
Which of these verbs is an irregular verb in the present tense?
Which of these verbs is an irregular verb in the present tense?
- Estar (correct)
- Vivir
- Hablar
- Comer
What does 'El Presente' tense refer to?
What does 'El Presente' tense refer to?
- I speak, I am speaking, I do speak (correct)
- I spoke
- I will speak
- I would speak
Which verb tense uses the endings -é, -ás, -á, -emos, -éis, -án?
Which verb tense uses the endings -é, -ás, -á, -emos, -éis, -án?
Which verb means 'to be' in El Imperfecto?
Which verb means 'to be' in El Imperfecto?
What is the past participle of 'abrir'?
What is the past participle of 'abrir'?
What is the meaning of the verb 'hacer'?
What is the meaning of the verb 'hacer'?
What is the purpose of the verb 'haber' in the Futuro Perfecto tense?
What is the purpose of the verb 'haber' in the Futuro Perfecto tense?
Which of these is the correct formula for Futuro Perfecto?
Which of these is the correct formula for Futuro Perfecto?
What does 'El Imperfecto' tense describe?
What does 'El Imperfecto' tense describe?
In 'El Pretérito', what is the ending for regular -AR verbs for 'yo'?
In 'El Pretérito', what is the ending for regular -AR verbs for 'yo'?
Which verb tense translates to 'I would speak'?
Which verb tense translates to 'I would speak'?
Which pronoun MUST go before the conjugated verb?
Which pronoun MUST go before the conjugated verb?
Which of the following verbs is considered a stem-changing verb?
Which of the following verbs is considered a stem-changing verb?
Which of the following is the irregular 'yo' form of 'poner' in the present tense?
Which of the following is the irregular 'yo' form of 'poner' in the present tense?
The verb 'cubrir' translates to what in English?
The verb 'cubrir' translates to what in English?
The verb 'satisfacer' translates to what in English?
The verb 'satisfacer' translates to what in English?
Which of these verb forms is described as I was talking?
Which of these verb forms is described as I was talking?
In the `tú affirmative' command, what happens in irregulars like 'di, pon, sal, ten, ve, sé, sal, ven'
In the `tú affirmative' command, what happens in irregulars like 'di, pon, sal, ten, ve, sé, sal, ven'
Flashcards
Irregular Usted, Ustedes, Nosotros Affirmative and Negative Commands
Irregular Usted, Ustedes, Nosotros Affirmative and Negative Commands
Yo form: dé/den/demos, esté/estén/estemos, vaya/vayan/vayamos, sea/sean/seamos, sepa/sepan/sepamos
Imperfect Progressive
Imperfect Progressive
Estar + -ando/iendo; expresses an ongoing action in the past.
Irregular Verbs in El Imperfecto
Irregular Verbs in El Imperfecto
Ser = era, eras, era, éramos, erais, eran. Ver = veÃa, veÃas, veÃa, veÃamos, veÃais, veÃan. Ir = iba, ibas, iba, Ãbamos, ibais, iban.
El Imperfecto Endings for Regular Verbs
El Imperfecto Endings for Regular Verbs
Signup and view all the flashcards
Study Notes
Numerical Integration
- Numerical integration involves approximating the definite integral of a function.
- The general approach is to approximate the function $f(x)$ with a polynomial and then integrate the polynomial.
Newton-Cotes Integration Formulas
- Newton-Cotes formulas use equally spaced points for integration.
- The points are defined as $x_i = x_0 + ih$, where $i = 0, 1,..., n$ and $h$ is the spacing between the points.
- These formulas integrate an $n^{th}$ degree interpolating polynomial.
Simplest Newton-Cotes Formula
- This formula approximates $f(x)$ by a line through the points $(a, f(a))$ and $(b, f(b))$.
- The approximation of the integral is given by $\int_{a}^{b} f(x) dx \approx (b-a) \frac{f(a) + f(b)}{2}$.
Error in Simplest Newton-Cotes Formula
- If $f(x)$ has a continuous second derivative on the interval $[a, b]$, denoted $f \in C^2[a, b]$, then the error $E$ can be expressed as $E = -\frac{(b-a)^3}{12} f''(\xi)$ for some $\xi \in (a, b)$.
Trapezoidal Rule
- The Trapezoidal Rule approximates the integral of $f(x)$ from $x_0$ to $x_1$ as $\int_{x_0}^{x_1} f(x) dx \approx \frac{h}{2} [f(x_0) + f(x_1)]$, where $h = x_1 - x_0$.
Composite Trapezoidal Rule
- To approximate the integral over a larger interval $[a, b]$, the Composite Trapezoidal Rule sums the approximations of the integral over subintervals.
- $\int_{a}^{b} f(x) dx = \int_{x_0}^{x_1} f(x) dx + \int_{x_1}^{x_2} f(x) dx +... + \int_{x_{n-1}}^{x_n} f(x) dx$.
- This leads to the formula $\frac{h}{2} [f(x_0) + 2\sum_{i=1}^{n-1} f(x_i) + f(x_n)]$.
Error in Composite Trapezoidal Rule
- The error $E$ for the Composite Trapezoidal Rule is given by $E = - \frac{(b-a)}{12} h^2 f''(\xi)$, where $h = \frac{b-a}{n}$ and $\xi$ is in the interval.
Example: $\int_{0}^{\pi} sin(x) dx$.
- The analytical solution to this integral is 2.
- The composite trapezoidal rule can be used with $n+1$ equally spaced points to approximate this integral.
Example Table
n | Approximation | Absolute Error |
---|---|---|
2 | 1.57079633 | 0.42920367 |
4 | 1.89611889 | 0.10388111 |
8 | 1.97423160 | 0.02576840 |
16 | 1.99357034 | 0.00642966 |
32 | 1.99839336 | 0.00160664 |
64 | 1.99959839 | 0.00040161 |
Simpson's Rule
- Approximates $f(x)$ by a quadratic through $(x_0, f(x_0))$, $(x_1, f(x_1))$ and $(x_2, f(x_2))$.
- It is assumed that $x_0$, $x_1$, and $x_2$ are equally spaced.
- The integral from is approximated by $\int_{x_0}^{x_2} f(x) dx \approx \frac{h}{3} [f(x_0) + 4f(x_1) + f(x_2)]$.
Error in Simpson's Rule
- If $f \in C^4[x_0, x_2]$, the error $E = -\frac{h^5}{90} f^{(4)}(\xi)$ for some $\xi \in (x_0, x_2)$.
Composite Simpson's Rule
- Applies Simpson's rule on subintervals $[x_0, x_2]$, $[x_2, x_4]$,..., $[x_{n-2}, x_n]$, where n must be even.
- The integral is approximated as $\int_{a}^{b} f(x) dx \approx \frac{h}{3} [f(x_0) + 4f(x_1) + 2f(x_2) + 4f(x_3) +... + 2f(x_{n-2}) + 4f(x_{n-1}) + f(x_n)]$.
Error in Composite Simpson's Rule
- The error $E = -\frac{(b-a)}{180} h^4 f^{(4)}(\xi)$, where $h = \frac{b-a}{n}$.
Example: $\int_{0}^{\pi} sin(x) dx$ using Composite Simpson's Rule
- Analytical solution: 2
- Use $n + 1$ equally spaced points.
Example Table
n | Approximation | Absolute Error |
---|---|---|
2 | 2.09439511 | 0.09439511 |
4 | 2.00455978 | 0.00455978 |
8 | 2.00026917 | 0.00026917 |
16 | 2.00001659 | 0.00001659 |
32 | 2.00000104 | 0.00000104 |
64 | 2.00000006 | 0.00000006 |
Chemical Kinetics
Reaction Rates
- The change in concentration of a reactant or product with respect to time.
- Units are typically $mol \cdot L^{-1} \cdot s^{-1}$ or $M/s$.
Rate Equation
- For a reaction $aA + bB \rightarrow cC + dD$, the rate equation is: $rate = -\frac{1}{a}\frac{\Delta [A]}{\Delta t} = -\frac{1}{b}\frac{\Delta [B]}{\Delta t} = \frac{1}{c}\frac{\Delta [C]}{\Delta t} = \frac{1}{d}\frac{\Delta [D]}{\Delta t}$.
- $[A]$, $[B]$, $[C]$, and $[D]$ are concentrations of reactants/products.
- $a$, $b$, $c$, and $d$ are stoichiometric coefficients.
- $\Delta t$ is the change in time.
Rate Law
- Relates the rate of a reaction to the concentrations of the reactants.
- The rate law is $rate = k[A]^m[B]^n$, where $k$ is the rate constant, and $m$ and $n$ are the reaction orders with respect to reactants $A$ and $B$, respectively.
- Reaction order must be determined experimentally.
Determining Reaction Order
- Initial Rates Method: Measure initial rate at different initial concentrations.
- Integrated Rate Laws: Use concentration vs. time data to determine the order by fitting the data to integrated rate laws.
Integrated Rate Laws
Zero-Order Reactions
- Rate Law: $rate = k$
- Integrated Rate Law: $[A]_t = -kt + [A]_0$
- Half-Life: $t_{1/2} = \frac{[A]_0}{2k}$
- Concentration decreases linearly with time.
- Half-life is dependent on the initial concentration.
First-Order Reactions
- Rate Law: $rate = k[A]$
- Integrated Rate Law: $ln[A]_t = -kt + ln[A]_0$
- Half-Life: $t_{1/2} = \frac{0.693}{k}$
- Concentration decreases exponentially with time.
- Half-life is constant and independent of initial concentration.
Second-Order Reactions
- Rate Law: $rate = k[A]^2$
- Integrated Rate Law: $\frac{1}{[A]_t} = kt + \frac{1}{[A]_0}$
- Half-Life: $t_{1/2} = \frac{1}{k[A]_0}$
- The rate depends on the square of the concentration.
- Half-life is inversely proportional to the initial concentration.
Reaction Mechanisms
- Elementary steps are single molecular events.
- The rate-determining step is the slowest step in a reaction mechanism.
- Molecularity refers to the number of molecules involved in an elementary step.
Temperature Dependence
- According to Collision theory reactant molecules must collide with sufficient energy for a reaction to occur
- Activation energy ($E_a$) is the minimum energy required for a reaction to occur.
- The Arrhenius equation is $k = Ae^{-E_a/RT}$.
- $k$ is the rate constant.
- $A$ is the pre-exponential factor.
- $E_a$ is the activation energy.
- $R$ is the gas constant ($8.314 J \cdot mol^{-1} \cdot K^{-1}$).
- $T$ is the temperature in Kelvin.
Catalysis
- A catalyst increases the rate of a chemical reaction without being consumed.
- Types: Homogeneous (same phase) and Heterogeneous (different phases).
- Catalysts lower the activation energy ($E_a$) by providing an alternative reaction pathway.
Thermodynamics
The First Law
Work, Heat and Energy
- Work:
- $W = \int_{x_1}^{x_2} F(x) dx$
- $W = \int_{V_1}^{V_2} p(V) dV$
- Heat: Energy transferred due to temperature difference.
- Heat Capacity:
- $C = \frac{q}{\Delta T}$, where $C$ is heat capacity, $q$ is heat added, and $\Delta T$ is the temperature change.
- Specific heat capacity ($c$): Heat to raise 1 gram by 1 degree Celsius (or 1 Kelvin).
- Molar heat capacity ($C_m$): Heat to raise 1 mole by 1 degree Celsius (or 1 Kelvin).
- $q = mc\Delta T$, where $m$ is mass, $c$ is specific heat capacity, and $\Delta T$ is temperature change.
- Work done during expansion:
- Reversible Isothermal Process: $W = -nRT \ln\left(\frac{V_2}{V_1}\right)$
- Adiabatic Process: $W = C_V (T_2 - T_1)$
The First Law
- States that energy is conserved.
- $\Delta U = q - W$
- $dU = dq - dW$
Enthalpy
- $H = U + pV$
- $dH = dU + pdV + Vdp$
- At constant pressure:
- $dH = dq_p$
- $\Delta H = q_p$
Heat Capacities at Constant Volume and Constant Pressure
- At constant volume: $C_V = \left(\frac{\partial U}{\partial T}\right)_V$
- At constant pressure: $C_p = \left(\frac{\partial H}{\partial T}\right)_p$
- For ideal gas: $C_p = C_V + R$
State Functions
- A property of a system that depends only on the current state of the system
- Examples: Internal energy ($U$), Enthalpy ($H$), Entropy ($S$), Gibbs free energy ($G$), Temperature ($T$), Pressure ($p$), Volume ($V$)
Standard Enthalpy Changes
- Standard Conditions:
- Temperature: $298 K$ ($25^\circ C$)
- Pressure: $1 bar$ ($10^5 Pa$)
- Standard enthalpy change of formation ($\Delta H_f^\ominus$): Enthalpy change when 1 mole of a substance is formed from its elements in their standard states.
- Hess's Law: $\Delta H_{rxn}^\ominus = \sum n \Delta H_f^\ominus \text{(products)} - \sum n \Delta H_f^\ominus \text{(reactants)}$
Temperature Dependence of Enthalpies
- Kirchhoff's Law: $\Delta H_T = \Delta H_{T_0} + \int_{T_0}^{T} \Delta C_p dT$
- Assuming that $\Delta C_p$ is independent of temperature: $\Delta H_T = \Delta H_{T_0} + \Delta C_p (T - T_0)$
Algorithmic Trading and Order Execution
What is Algorithmic Trading?
- Using computer programs to automatically execute trades based on pre-defined instructions.
- Speed: Executes orders faster than humans.
- Efficiency: Reduces transaction costs.
- Accuracy: Minimizes human error.
- Complexity: Can handle complex strategies.
Types of Algorithmic Trading Strategies
- Trend Following:
- Identifies and follows market trends.
- Buys when the price is trending up, sells when trending down.
- Example: Moving averages, breakout strategies.
- Mean Reversion:
- Capitalizes on price deviations from the average.
- Buys when the price is low relative to its average, sells when high.
- Example: Bollinger Bands, Relative Strength Index (RSI).
- Arbitrage:
- Exploits price differences in different markets.
- Simultaneously buys in one market and sells in another to profit from the difference.
- Example: Statistical arbitrage, triangular arbitrage.
- Market Making:
- Provides liquidity by placing buy and sell orders.
- Profits from the spread between the bid and ask prices.
- Example: High-Frequency Trading (HFT).
- Execution Algorithms:
- Optimizes order execution to minimize market impact.
- Breaks large orders into smaller pieces and executes them over time.
- Example: TWAP, VWAP, Implementation Shortfall.
Order Execution Algorithms
- Time-Weighted Average Price (TWAP):
- Objective: Execute an order at the average price over a specified period.
- Method: Divides the order into equal portions and executes them at regular intervals.
- Formula: $$ TWAP = \frac{\sum_{i=1}^{n} P_i * V_i}{\sum_{i=1}^{n} V_i} $$
- $P_i$ = Price at time i
- $V_i$ = Volume at time i
- $n$ = Number of intervals
- Volume-Weighted Average Price (VWAP):
- Objective: Execute an order at the average price weighted by volume over a specified period.
- Method: Executes larger portions of the order when the trading volume is high.
- Formula: $$ VWAP = \frac{\sum_{i=1}^{n} P_i * V_i}{\sum_{i=1}^{n} V_i} $$
- $P_i$ = Price at time i
- $V_i$ = Volume at time i
- $n$ = Number of intervals
- Implementation Shortfall:
- Objective: Minimize the difference between the actual execution price and the benchmark price.
- Method: Balances the trade-off between aggressive execution and market impact.
- Considerations: Includes factors like market volatility, order size and urgency.
- Percentage of Volume (POV):
- Objective: Participate in a specified percentage of the market volume.
- Method: Executes orders proportionally to the current market volume.
- Example: Aims to execute 10% of the market volume.
Advantages of Algorithmic Trading
- Reduced Costs: Lower transaction costs due to efficient execution.
- Improved Speed: Faster order execution.
- Increased Precision: Minimized human error.
- Backtesting: Ability to test strategies on historical data.
- 24/7 Trading: Continuous monitoring and execution.
Disadvantages of Algorithmic Trading
- Technical Issues: Risk of system failures.
- Over-Optimization: Strategies may perform poorly in live trading
- Complexity: Requires expertise in programming and finance
- Regulatory Risks: Compliance with trading regulations
- Market Volatility: Can amplify losses during extreme market conditions
Conclusion
Algorithmic trading offers numerous benefits but requires careful planning, implementation, and risk management. Understanding various strategies and execution algorithms is crucial for successful algorithmic trading.
Lecture 18: December 5
Proof of Theorem 4.8.
- Already showed that $\sqrt[n]{x_{1} \ldots x_{n}} \leq \frac{x_{1}+\cdots+x_{n}}{n} \quad\left(x_{i}>0\right)$
- Let $x_{1}, \ldots, x_{n-1}>0$ be fixed; find $x_{n}>0$ such that $x_{1} \cdots x_{n}=1$.
- Let $f\left(x_{n}\right)=x_{1}+\cdots+x_{n-1}+x_{n}$; want to minimize $f\left(x_{n}\right)$.
- $x_{n}=\frac{1}{x_{1} \cdots x_{n-1}}$
- $f\left(x_{n}\right)=x_{1}+\cdots+x_{n-1}+\frac{1}{x_{1} \cdots x_{n-1}}$
- $f^{\prime}\left(x_{n}\right)=1-\frac{1}{\left(x_{1} \cdots x_{n-1}\right) x_{n}^{2}}=1-\frac{x_{1} \cdots x_{n-1}}{\left(x_{1} \cdots x_{n-1}\right)^{2}}=1-\frac{1}{x_{1} \cdots x_{n-1}}$
- If $x_{1} \cdots x_{n-1}=1$, then $f^{\prime}\left(x_{n}\right)=0$.
- $f^{\prime \prime}\left(x_{n}\right)=\frac{2}{\left(x_{1} \cdots x_{n-1}\right) x_{n}^{3}}>0$, so $x_{1}=x_{2}=\cdots=x_{n}=1$ is a minimum.
- Therefore $f\left(x_{n}\right) \geq n$, which means $x_{1}+\cdots+x_{n-1}+\frac{1}{x_{1} \cdots x_{n-1}} \geq n$
- Let $a_{1}, \ldots, a_{n}>0$. Then $a_{1}+\cdots+a_{n} \geq n \sqrt[n]{a_{1} \cdots a_{n}}$.
- By letting $x_{i}=\frac{a_{i}}{\sqrt[n]{a_{1} \cdots a_{n}}}>0$: $\prod_{i=1}^{n} x_{i}=\frac{a_{1} \cdots a_{n}}{a_{1} \cdots a_{n}}=1$
- $\sum_{i=1}^{n} x_{i}=\sum_{i=1}^{n} \frac{a_{i}}{\sqrt[n]{a_{1} \cdots a_{n}}} \geq n$
- $\sum_{i=1}^{n} a_{i} \geq n \sqrt[n]{a_{1} \cdots a_{n}}$
Example 4.9
-
Show that if $a, b, c>0$, then $(a+b+c)\left(\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\right) \geq 9$
-
Proof:
-
$a+b+c \geq 3 \sqrt{a b c}$
-
$\frac{1}{a}+\frac{1}{b}+\frac{1}{c} \geq 3 \sqrt{\frac{1}{a b c}}$
$(a+b+c)\left(\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\right) \geq 9 \sqrt{a b c} \cdot \sqrt{\frac{1}{a b c}}=9$.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.