An Electromagnetic Wave in a Conductor (Part 1)
Introduction
One of the most important conclusions that comes from Maxwell’s equations is that electric and magnetic fields can propagate as waves. However, this is only half the story - the propagation of light in a vacuum is very different from the propagation of light in a dielectric which is very different from the propagation of light in a conductor. Let’s take a moment to analyze the propagation of light in a conductor.
Maxwell’s Equations
We will start off with Maxwell’s equations in an isotropic medium with permittivity \(\epsilon\) and permeability \(\mu\).
\[\begin{equation} \nabla \cdot \vec{E} = \frac{\rho}{\epsilon} \end{equation}\] \[\begin{equation} \nabla \cdot \vec{B} = 0 \end{equation}\] \[\begin{equation} \nabla \times \vec{E} = -\frac{d\vec{B}}{dt} \end{equation}\] \[\begin{equation} \nabla \times \vec{B} = \mu \vec{J} + \mu \epsilon \frac{d\vec{E}}{dt} \end{equation}\]Light is an electromagnetic wave, meaning that it can be modeled as a pair of oscillating electric and magnetic fields. The magnitude of the electric field is much larger than the magnitude of the magnetic field, so we will ignore the magnetic field for now.
The electric field won’t do much to a dielectric or vacuum since there are no free charges to move around. However, the free charges in a metal can move around in response to the electric field, changing the properties of the propagation of light. We are going to assume that the current density (\(\vec{J}\)) only depends on the electric field from the propagating wave (\(\vec{E}\)) and the conductivity of the metal (\(\sigma\)). The simplest form of this relationship is \(\vec{J} = \sigma \vec{E}\). Additionally, we know that excess charge within a conductor is equal to zero. Thus, Maxwell’s equations become:
\[\begin{equation} \nabla \cdot \vec{E} = 0 \end{equation}\] \[\begin{equation} \nabla \cdot \vec{B} = 0 \end{equation}\] \[\begin{equation} \nabla \times \vec{E} = -\frac{d\vec{B}}{dt} \end{equation}\] \[\begin{equation} \nabla \times \vec{B} = \mu \sigma \vec{E} + \mu \epsilon \frac{d\vec{E}}{dt} \end{equation}\]Let’s focus on the third equation in the group above (the curl of electric field). We can take the curl of each side of that equation and use a vector calculus identity to simplify.
\[\begin{equation} \nabla \times \left ( \nabla \times \vec{E} \right ) = \nabla \times \left ( -\frac{d\vec{B}}{dt} \right ) \end{equation}\] \[\begin{equation} \nabla \left ( \nabla \cdot \vec{E} \right ) - \nabla^2 \vec{E} = - \frac{d}{dt} \left ( \nabla \times \vec{B} \right ) \end{equation}\]We can now use Maxwell’s equations for the curl of \(\vec{B}\) and the divergence of \(\vec{E}\) to simplify this expression further.
\[\begin{equation} 0 - \nabla^2 \vec{E} = - \frac{d}{dt} \left ( \mu \sigma \vec{E} + \mu \epsilon \frac{d\vec{E}}{dt} \right ) \end{equation}\] \[\begin{equation} - \nabla^2 \vec{E} = - \frac{d}{dt} \left ( \mu \sigma \vec{E} + \mu \epsilon \frac{d\vec{E}}{dt} \right ) \end{equation}\] \[\begin{equation} \nabla^2 \vec{E} = \mu \sigma \frac{d \vec{E}}{dt} + \mu \epsilon \frac{d^2 \vec{E}}{dt^2} \end{equation}\]The electric field in an electromagnetic wave oscillates with some frequency \(\omega\) and has some wavevector \(\vec{k}\). Thus, let’s assume that our electric field has the form \(\vec{E} = \vec{E}_o exp[i(\vec{k}\cdot \vec{r} + \omega t)]\) where \(\vec{E}_o\) is the polarization of the electromagnetic wave and \(\vec{r}\) is a position within the conducting material. Plugging that expression into the equation above yields:
\[\begin{equation} \nabla^2 \left [ \vec{E}_o e^{i(\vec{k}\cdot\vec{r}+\omega t)} \right ] = \mu \sigma \frac{d}{dt}\left [ \vec{E}_o e^{i(\vec{k}\cdot\vec{r}+\omega t)} \right ] + \mu \epsilon \frac{d^2}{dt^2}\left [ \vec{E}_o e^{i(\vec{k}\cdot\vec{r}+\omega t)} \right ] \end{equation}\] \[\begin{equation} \nabla^2 \left [ \vec{E}_o e^{i\vec{k}\cdot\vec{r}}e^{i\omega t} \right ] = \mu \sigma \frac{d}{dt}\left [ \vec{E}_o e^{i\vec{k}\cdot\vec{r}}e^{i\omega t} \right ] + \mu \epsilon \frac{d^2}{dt^2}\left [ \vec{E}_o e^{i\vec{k}\cdot\vec{r}}e^{i\omega t} \right ] \end{equation}\] \[\begin{equation} \vec{E}_o e^{i\omega t} \nabla^2 \left [ e^{i\vec{k}\cdot\vec{r}} \right ] = \mu \sigma \vec{E}_o e^{i\vec{k}\cdot\vec{r}} \frac{d}{dt}\left [ e^{i \omega t} \right ] + \mu \epsilon \vec{E}_o e^{i\vec{k}\cdot \vec{r}} \frac{d^2}{dt^2}\left [ e^{i\omega t} \right ] \end{equation}\]We can expand \(\vec{k}\cdot\vec{r}\) and \(\nabla^2\) in order to solve for the Laplacian on the left side of the equation.
\[\begin{align} \vec{E}_o e^{i\omega t} \nabla^2 \left [ e^{i\vec{k}\cdot\vec{r}} \right ] &= \vec{E}_o e^{i\omega t} \left [ \frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} + \frac{\partial^2}{\partial z^2} \right ] \left [ e^{i(k_xx+k_yy+k_zz)} \right ]\\ &= \vec{E}_o e^{i\omega t} \left [ \frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} + \frac{\partial^2}{\partial z^2} \right ] \left [ e^{ik_xx} e^{ik_yy} e^{ik_zz} \right ]\\ &= \vec{E}_o e^{i\omega t} \left [ \frac{\partial^2}{\partial x^2} \left ( e^{ik_xx} e^{ik_yy} e^{ik_zz} \right ) + \frac{\partial^2}{\partial y^2} \left ( e^{ik_xx} e^{ik_yy} e^{ik_zz} \right ) + \frac{\partial^2}{\partial z^2} \left ( e^{ik_xx} e^{ik_yy} e^{ik_zz} \right ) \right ]\\ &= \vec{E}_o e^{i\omega t} \left [ e^{ik_yy} e^{ik_zz} \frac{\partial^2}{\partial x^2} \left ( e^{ik_xx} \right ) + e^{ik_xx}e^{ik_zz} \frac{\partial^2}{\partial y^2} \left ( e^{ik_yy} \right ) + e^{ik_xx} e^{ik_yy} \frac{\partial^2}{\partial z^2} \left ( e^{ik_zz} \right ) \right ]\\ &= \vec{E}_o e^{i\omega t} \left [ -k_x^2 e^{ik_xx} e^{ik_yy} e^{ik_zz} - k_y^2 e^{ik_xx}e^{ik_yy} e^{ik_zz} - k_z^2 e^{ik_xx} e^{ik_yy} e^{ik_zz} \right ]\\ &= - \vec{E}_o e^{i\omega t} \left [ k_x^2 + k_y^2 + k_z^2 \right ] e^{ik_xx} e^{ik_yy} e^{ik_zz}\\ &= - k^2 \vec{E}_o e^{i\omega t} e^{i(k_xx+k_yy+k_zz)}\\ &= - k^2 \vec{E}_o e^{i\omega t} e^{i\vec{k}\cdot\vec{r}}\\ &= - k^2 \vec{E}_o e^{i(\vec{k}\cdot\vec{r}+\omega t)} \end{align}\]We can use this result to find the relationship between k and \(\omega\).
\[\begin{equation} \vec{E}_o e^{i\omega t} \nabla^2 \left [ e^{i\vec{k}\cdot\vec{r}} \right ] = \mu \sigma \vec{E}_o e^{i\vec{k}\cdot\vec{r}} \frac{d}{dt}\left [ e^{i \omega t} \right ] + \mu \epsilon \vec{E}_o e^{i\vec{k}\cdot \vec{r}} \frac{d^2}{dt^2}\left [ e^{i\omega t} \right ] \end{equation}\] \[\begin{equation} - k^2 \vec{E}_o e^{i(\vec{k}\cdot\vec{r}+\omega t)} = \mu \sigma \vec{E}_o e^{i\vec{k}\cdot\vec{r}} \left [ i\omega e^{i \omega t} \right ] + \mu \epsilon \vec{E}_o e^{i\vec{k}\cdot \vec{r}} \left [ -\omega^2 e^{i\omega t} \right ] \end{equation}\] \[\begin{equation} - k^2 \vec{E}_o e^{i(\vec{k}\cdot\vec{r}+\omega t)} = i\omega \mu \sigma \vec{E}_o e^{i(\vec{k}\cdot\vec{r}+\omega t)} - \omega^2 \mu \epsilon \vec{E}_o e^{i(\vec{k}\cdot\vec{r}+\omega t)} \end{equation}\]Dividing through by \(\vec{E}_o e^{i(\vec{k}\cdot\vec{r}+\omega t)}\) yields:
\[\begin{equation} - k^2 = i\omega \mu \sigma - \omega^2 \mu \epsilon \end{equation}\] \[\begin{equation} k^2 = \omega^2 \mu \epsilon - i\omega \mu \sigma \end{equation}\] \[\begin{equation} k = \sqrt{ \omega^2 \mu \epsilon - i\omega \mu \sigma } \end{equation}\]Oftentimes, this relationship is written as:
\[\begin{equation} \widetilde{k} = \omega \sqrt{ \mu \epsilon - \frac{i \mu \sigma}{\omega} } = \frac{\widetilde{n} \omega}{c} \end{equation}\]where \(\widetilde{k}\) is a complex wavevector and \(\widetilde{n}\) is a complex refractive index.
Same Problem, Different Convention
I have often seen theorists use the convention \(\vec{E} = \vec{E}_o exp[i(\vec{k}\cdot \vec{r} - \omega t)]\) when describing the oscillations of the electric field. Really, this is the same problem as above - the only difference is that the \(i\omega\mu\sigma\) term will pick up an extra negative sign and you will get:
\[\begin{equation} \widetilde{k} = \omega \sqrt{ \mu \epsilon + \frac{i \mu \sigma}{\omega} } = \frac{\widetilde{n} \omega}{c} \end{equation}\]Try going through it yourself if you feel like you need some practice :)
What Exactly Does This Mean?
Next week, we will discuss what a complex index of refraction actually means. It might seem complicated, but really, it has a simple interpretation. Until next week!


About
I'm an Assistant Professor and the co-Director of the Cyber Security Research Center in the School of Software at Soongsil University, Seoul, Korea.
My primary research interests lie in the field of systems security to discover and mitigate security concerns.
I am, also, passionate about analyzing, finding and resolving security issues in a wide range of topics.
I am actively looking for self-motivated students (including Ph.D., master, and undergraduate students). Please email me if you’re interested in cyber security research.


Web Development Course
Hii,I am Saurabh Nayak WelcoMe You to This plateform ..you will learn how to become
a charm developer .Web development , Coding all are the backbone of modern
and future technology .We will give you updates for upcoming launching
courses. Good web development means a fully optimised website which plays
a vital role in attracting valuable search engine traffic. Consumers are
essentially still looking for information by using keyword searches in
Google and other search engines.Jan


All these quotes are from high school. I had some interesting teachers at DeBakey HSHP, and here are just a few classic lessons I got from them.
"You need to eat, you need to pee, you need to pay taxes, you need to die" -M. Stilkenboom, Economics Teacher
"Think like a capitalist pig, and you will succeed in this class" -M. Stilkenboom, Economics Teacher
"It depends on how long it takes before you realize you are being stupid" -Desai, Calculus Teacher
"You should have kids Anson" -Andrea "I ran out of time. -Anson, in reply
"Anyone who is not here, who wishes to be recognized, raise your hand." -Mr. Mac, Substitue Teacher
"I don't want this debate to be like a shouting match.


Change between light and dark mode or apply a custom theme. Custom themes only apply to the main Operate section.


tbldef.Rd
Constructs a table specification.
tbldef.col(cast = ident, ptype = NULL) tbldef(coldefs = list(), klass = NULL)
| cast | A casting function that casts its first argument into the appropriate type.
Ideally, this function should handle NULL and convert it into the appropriate type, but if not, use |
|---|---|
| ptype | The 'prototype' value to use when a column is missing as part of a cast procedure. See details. |
| coldefs | A named list of |
| klass | A classname (or ordered classnames, if more than one) to prepend during the table-casting process. |
tbldef.col
Each table's definition is made up of a named list of tbldef.col
definitions, specifying each column's type.
tbldef.col
takes a casting function cast
and optionally a ptype
(the latter of which is described below in "Missing columns").
The default cast
argument is ident
, which is the identify function and performs no casting on the column at all.
[0]
-abilityThe table's cast
procedure uses row-binding approach and pre-computes a zero-row table (the definition's ptype
) to which a (possibly modified) input table will row-combined.
To compute the zero-row table, the results of each column's cast
function must be indexable such that it can be truncated to a length-zero vector or list (or a zero-row dataframe, in the case of a folded dataframe column).
Generally-speaking, that means each column's cast
and ptype
argument's should be callable like so: cast(ptype)[0]
or (cast(ptype)[0,]
in the folded dataframe case).
When an input table is missing columns that are part of the table definition, those missing columns are added to the output.
The column type in that case is the result of calling the column's cast
function on the ptype
argument.
By default ptype
is NULL
, so cast
should be tolerant of NULL
and return a non-NULL
result, as NULL
values cannot be in a dataframe column (apart from elements in a listcol).
If the cast
function is not tolerant of NULL
, specify the ptype
such that the column's cast
returns an appropriately-typed value.
Tibbles support the notion of a column-collapsed 'folded' dataframe.
This is distinct from, but conceptually related-to, 'nested' dataframes and listcols.
In the folded dataframe case, there is no listcol: the type of the column itself is tbl
.
Folded dataframes have the same number of rows as the surrounding dataframe of which they are a part, but simply allow the columns to be nested.
For example:
In that example, the 'outer' table has two columns (col1
and col2
), while the inner table (col2
) has two columns (also called col1
and col2
, but distinct from the 'parent' columns of the same name).
There are only three 'vector' columns in the full table, however: col1
, col2$col1
, and col2$col2
.
tbldef
supports this notion by permitting additional tbldef
s as values within the coldefs
argument.
tbldef.col
returns a structure that should only be used within the context of a tbldef
(hence the naming scheme).
tbldef
returns a list with three components:
cast
the casting function with this signature: cast(x = data.frame(), .keep_all = TRUE, ...)
.
x
is the table on which to perform the casting. NULL
is treated identically to an empty (0 x 0) table.
.keep_all
is a logical flag telling the casting function whether or not additional columns in x
should be retained.
These are columns that are not part of the table definition, but perhaps one wants to keep attached to the output table.
In such cases, these columns are moved to the end (right side) and are otherwise not touched.
ptype
a zero-row 'prototype' table with typed columns.
klass
simply a pass-back of the klass
argument in the tbldef
function (for reference when managing table definitions).
def <- tbldef(list( col1 = tbldef.col(as.integer), col2 = tbldef.col(as.character) )) ## casting an empty table (or NULL) results in the zero-row ptype: def$cast()#> # A tibble: 0 x 2 #> # … with 2 variables: col1 <int>, col2 <chr>def$ptype#> # A tibble: 0 x 2 #> # … with 2 variables: col1 <int>, col2 <chr>## cast a table with a missing column and drop an extraneous column: def$cast(data.frame(col1 = c("1", "2", "3"), col3 = c(TRUE, FALSE, TRUE)))#> # A tibble: 3 x 2 #> col1 col2 #> <int> <chr> #> 1 1 NA #> 2 2 NA #> 3 3 NA## now let's do the same but keep the extraneous column and demonstrate its repositioning: def$cast(data.frame(col3 = c(TRUE, FALSE, TRUE), col1 = c("1", "2", "3")), .keep_all = TRUE)#> # A tibble: 3 x 3 #> col1 col2 col3 #> <int> <chr> <lgl> #> 1 1 NA TRUE #> 2 2 NA FALSE #> 3 3 NA TRUE


 In Chapter 5, we looked how we could better understand a mathematical theory. Simulations can help us to better understand the relation between firm size and compensation. This is link (1) in the Libby boxes. In Chapter 7, we focus on the links (3) and (4). The measures in the statistical analysis depend on the theoretical assumptions. In section 7.8, we focused on how we establish statistically a link between the two measures which is link (2) in the boxes.
Figure 8.1: Predictive Validity Framework or Libby Boxes for pay-performance sensitivity
We are going to run a lot of regressions in this chapter. I load
the stargazer
package which helps to make tables of regressions.
suppressMessages(library(stargazer))
suppressMessages(library(tidyverse))
library(DiagrammeR)
<- getOption("knitr.table.format") tab_format
We also need to reread the data and calculate some extra variables.
The most important feature is that we have a new dataset us_firm
with two important variables. The first one is ipo_employee
or
whether the CEO was an employee when the company did their
initial public offering. The second one is ipo_ceo
indicating
whether the CEO was already in their position when the company
launched their initial public offering. From section
7.4, we know that CEOs who are present early
in the life of the company might not have a compensation contract
that follows the efficient incentive contract.54 Not because they
are abusing their power necessarily, but because they are
intrinsically motivated to do well for the company and they are
motivated to stay in control of the company which is easier if
they have more shares than necessary from an incentive point of view.
<- readRDS("data/us-compensation.RDS") %>%
us_comp rename(total_comp = tdc1, shares = shrown_tot_pct)
<- readRDS("data/us-value.RDS") %>%
us_value rename(year = fyear, market_value = mkvalt)
<- readRDS("data/us-company.RDS")
us_firm
<- left_join(us_comp, us_firm, by = "cusip") %>%
combined left_join(us_value, by = c("year", "gvkey")) %>%
mutate(ipo_ceo = I(becameceo < begdat),
ipo_employee = I(joined_co < begdat),
wealth = shares * market_value / 100) %>%
mutate(ipo_employee = if_else(is.na(ipo_employee), ipo_ceo,
%>%
ipo_employee)) mutate(ipo = ifelse(ipo_ceo, "ceo",
ifelse(ipo_employee, "employee", "none")))
<- group_by(combined, gvkey) %>%
combined_change arrange(year) %>%
mutate(
delta_total = log(total_comp) - log(lag(total_comp)),
delta_wealth = log(wealth) - log(lag(wealth)),
delta_value = log(market_value) - log(lag(market_value))) %>%
filter(!is.infinite(delta_total),
!is.infinite(delta_value),
!is.infinite(delta_wealth),
> 2011) year
In this chapter, I will use Directed Acyclical Graphs (or DAGs) to visualise and understand the theory that applies to the empirical data. DAGs follow from the work of Pearl (2009a) and Pearl (2009b). I personnaly like the introductions in Cunningham (2018) and Rohrer (2018). Figure 8.2 shows an example of a DAG for a paper that was presented in our seminar. The setting is typical for a finance and accounting paper.
The key variable xbrl
indicates whether a company has been
mandated to adopt the XBRL format to publish its financial
statements. XBRL is a mark-up language like XML that puts
structure on the financial statements and makes them more easily
machine readable which should improve the information environment
for investors. While the information environment can not be
directly measured, it is possible to measure the informativeness
of the stock prices in companies. XBRL adoption has been
staggered over three years, where larger firms were mandated to
adopt in the first year, the medium ones in the second year, and
lastly the smaller firms.
Figure 8.2: Example of a Directed Acyclical Graph
The paper is also interested in whether the adoption of xbrl
has an impact on institutional owenship in the company. The
difficulties with studying this relation are given by rest of the
DAG. The size of the company also affects institutional ownership
before XBRL adoption and studies have shown that institutional
ownership affects the information environment.
Figure 8.2 serves as an example of what a DAG for a single study can look like. For a typical study, the DAG can quickly become quite complex. One of the reasons is that a social science observational study always have to account for a large number of potential effects. The second reason is that DAGs do not allow for direct feedback loops55 That is what acyclical means and we have to account for the feedback between institutional ownership and information environment by adding a time modifier (before and after) to the institutional ownership variables.
In the remainder of this chapter, we are interested in testing
the relation between x
and y
and we have to make a decision
whether we should control for z
. The first reason to control
for a variable is because it affects the outcome of interest.
This is often the main reason given to control for a variable,
it affects the outcome.
Figure 8.3: Measurement error
We can illustrate the problem with a simulation. We are
interested in the effect of x
on y
and there is another
factor z
with a large effect on z
. We print the regression
of y
on x
with and without z
as a control variable with the
stargazer
package (Hlavac 2018).
set.seed(12345)
= 500
obs <- rnorm(n = obs); z <- rnorm(n = obs)
x <- rnorm(n = obs, mean = 1 * x + 20 * z, sd = 1)
y <- tibble(y = y, x = x, z = z)
d <- lm(y ~ x, data = d)
yx <- lm(y ~ x + z, data = d)
yxz stargazer(yx, yxz, type = tab_format,
label = "measurement_error",
omit = c("Constant"), digits = 2,
intercept.bottom = FALSE,
star.cutoffs = c(0.05, 0.01, 0.001),
keep.stat = c("n", "rsq"))
| Dependent variable: | ||
| y | ||
| (1) | (2) | |
| x | 0.97 | 1.07*** |
| (0.91) | (0.05) | |
| z | 19.99*** | |
| (0.04) | ||
| Observations | 500 | 500 |
| R2 | 0.002 | 1.00 |
| Note: | p<0.05; p<0.01; p<0.001 |
The estimate of the effect of x
regressions is close to the
true value, 1, but the standard error is much smaller when we
include z
as a control variable. The reason to control for z
is to make sure that we have a precise estimate of the effect of
interest, however the estimate itself is not going to change when
z
only has an effect on y
.
We can turn to the CEO data to illustrate the idea of controlling for other factors that might effect the variable of interest. We investigate the relationship between CEO ownership and market value of the company in Figure 8.4.
Figure 8.4: Relation between CEO ownership and market value for SP500 firms (2011-2018).
<- select(combined, market_value, shares, ipo) %>%
meas_data filter(complete.cases(.))
<-
ownership ggplot(data = meas_data,
aes(x = market_value/1000, y = shares + 0.001)) +
geom_point() +
scale_x_continuous(trans = "log",
breaks = scales::log_breaks(n = 5, base = 10),
labels = function(x) prettyNum(x, dig = 2)) +
scale_y_continuous(trans = "log",
breaks = scales::log_breaks(n = 5, base = 10),
labels = function(x) prettyNum(x, dig = 2),
limits = c(NA, 50)) +
labs(y = "CEO ownership", x = "Market Value in $ Billion")
print(ownership)
## Warning: Removed 4 rows containing missing values (geom_point).
We hypothesised back in Chapter 7 that
CEOs who are founders will have higher ownership for reasons that
have nothing to do with the optimal incentives. We cannot directly
measure whether CEOs are founders but we know wether they are
already CEO (ipo_ceo
) or employee (ipo_employee
) at the time
of the initial public offering of the company. We include those
two variables as indicator variables in the regression because it is
more likely that these CEOs are also the founders of the company56 I will
ignore the fact that we lose observations in calculating the new
variables. That is not necessarily a good idea..
<- log(shares + 0.001) ~ log(market_value/1000)
form <- lm(form, data = combined)
base <- update(form, . ~ . + ipo_ceo + ipo_employee)
form_error <- lm(form_error, data = combined)
error stargazer(base, error, type = tab_format,
label = "ownership",
digits = 2, intercept.bottom = FALSE,
star.cutoffs = c(0.05, 0.01, 0.001),
keep.stat = c("n", "rsq"))
| Dependent variable: | ||
| log(shares + 0.001) | ||
| (1) | (2) | |
| Constant | -0.16*** | -0.46*** |
| (0.01) | (0.07) | |
| log(market_value/1000) | -0.47*** | -0.46*** |
| (0.01) | (0.02) | |
| ipo_ceo | 0.19 | |
| (0.11) | ||
| ipo_employee | 1.08*** | |
| (0.10) | ||
| Observations | 19,290 | 4,364 |
| R2 | 0.22 | 0.19 |
| Note: | p<0.05; p<0.01; p<0.001 |
Unfortunately, controlling for ipo_ceo
and ipo_employee
does not
really improve the precision of our estimates for the effect of
market value on ownership. The standard error for the estimate stays
about the same (i.e. \(0.2\)).
This is a bit of disgression of the main storay and you skip this section. Nevertheless, I would encourage you to go over the example as it gives a good example of how to interpret the numbers in a regression. Something, you will have to do for your thesis as well.
The regression we have estimated is
\[\begin{equation*} \mathrm{log}(S + 0.001) = \beta_0 + \beta_1 \mathrm{log}(MV) + \beta_2 \mathrm{ipo\_ceo} + \beta_3 \mathrm{ipo\_employee} \end{equation*}\]
and based on the theory, we are mainly interested in the parameter \(\beta_1\). However, something intriguing is going on with the coefficients for the two control variable. The results seem to imply that whether the CEO was an employee at the time of the IPO is a better indicator for share ownership than whether the CEO was already CEO at the time of the IPO.
That conclusion is not correct. There are a number of ways you can
see this. When the CEO was already CEO at the time of the IPO,
they were also already an employee. That means that the ipo_ceo
variable is dependent on the ipo_employee
variable. If
ipo_employee = 0
then ipo_ceo = 0
and if ipo_ceo = 1
then
ipo_employee = 1
. You could also see this if you make a descriptive
table with the percentage of observations with each theoretical
combination of the ipo_ceo
and ipo_employee
variable.
%>% select(ipo_ceo, ipo_employee, year) %>%
combined group_by(year) %>%
summarise(
ipo_both = mean(ipo_ceo * ipo_employee, na.rm = T),
ipo_ceo_only = mean(ipo_ceo * (1 - ipo_employee),
na.rm = T),
ipo_empl_only = mean((1 - ipo_ceo) * ipo_employee,
na.rm = T),
ipo_none = mean((1 - ipo_ceo) * (1 - ipo_employee),
na.rm = T)
%>% kableExtra::kable(digits = 2, booktabs = TRUE) )
| year | ipo_both | ipo_ceo_only | ipo_empl_only | ipo_none |
|---|---|---|---|---|
| 2011 | 0.17 | 0 | 0.07 | 0.76 |
| 2012 | 0.17 | 0 | 0.08 | 0.76 |
| 2013 | 0.17 | 0 | 0.07 | 0.76 |
| 2014 | 0.16 | 0 | 0.06 | 0.78 |
| 2015 | 0.14 | 0 | 0.05 | 0.80 |
| 2016 | 0.14 | 0 | 0.05 | 0.82 |
| 2017 | 0.12 | 0 | 0.04 | 0.83 |
| 2018 | 0.12 | 0 | 0.03 | 0.85 |
| 2019 | 0.11 | 0 | 0.03 | 0.86 |
| 2020 | 0.05 | 0 | 0.05 | 0.90 |
The table again shows that it is impossble for a CEO to have been the
CEO at the time of the IPO but not an employee57 ipo_ceo_only
equals
0 in every year.. This example shows the importance of using
descriptive statistics to better understand the data. Even if you had
not realised that there is a relation between ipo_ceo
and
ipo_employee
, the table would have alerted you to it.
It also shows us that we cannot interpret the coefficients separately.
The right way to interpret the coefficients is to interpret them
together. However, there is a second problem with interpreting our
regression outcomes. We modelled log(shares + 0.001)
and so the
effect are a bit harder to interpret. With some rearrangement of the
regression function, we can make the interpreation easier.
\[\begin{align*} \mathrm{log}(S + 0.001) &= \beta_0 + \beta_1 \mathrm{log}(MV) + \beta_2 \mathrm{ipo\_ceo} + \beta_3 \mathrm{ipo\_employee} \\ S + 0.001 &= e^{\beta_0} e^{\beta_1 \mathrm{log}(MV)} e^{\beta_2 \mathrm{ipo\_ceo}} e^{\beta_3 \mathrm{ipo\_employee}} \\ S + 0.001 &= e^{\beta_0} MV^{\beta_1} e^{\beta_2 \mathrm{ipo\_ceo}} e^{\beta_3 \mathrm{ipo\_employee}} \end{align*}\]
This means that the relation between ownership and whether CEO is a
(likely) founder is multiplicative. For a given firm size, the CEO
owns \(e^{\beta_3}\) times more shares when they were already an employee
at time of the IPO, and \(e^{\beta_2 + \beta_3}\) times more shares when
they were already CEO (and thus also employee) at the time of the
IPO58 This ignores the \(0.001\) adjustment but it does not really make
a difference in this example.. We can easily calculate these values
in R
.
<- error$coefficients["ipo_ceoTRUE"]
beta2 <- error$coefficients["ipo_employeeTRUE"]
beta3 exp(beta3)
## ipo_employeeTRUE
## 2.949815
exp(beta2 + beta3)
## ipo_ceoTRUE
## 3.555428
This means that the CEO who has already an employee at the time of IPO, has 2.9 times higher ownership and a CEO who was already CEO at the time of IPO has 3.6 times more shares than a CEO who was not in their company of similar size at the time of the IPO.
Page built: 2022-02-01 using R version 4.1.2 (2021-11-01)


Interested in developing experience in the fields of software engineering and quantitative analysis.
A web app designed to show the world how easy it is to make a difference, one credit card swipe at a time.


This document may serve as an introduction into the internals of yabasic. It is aimed at anyone who wants to:
If you just want to use yabasic, you do not need to read this page.
Right now this document is just a short draft in need of an update. But at least there is a table of contents:
Lets make a list of tools needed to change or develop yabasic:
Flex and Bison are tools which accept specially formatted input files (yabasic.flex and yabasic.bison) and emit C-code (flex.c and bison.c) which is compiled and linked to the rest of yabasic. Both are GNU tools and come with their own documentation in info format.
With Flex you can define the tokens of yabasic. Tokens are the keywords which constitute the skeleton of any yabasic program. "if", "print", "<" are examples of tokens. If you'd like to change yabasic to accept "whenever" instead of "if", you would need to tinker with the Flex input-file (which is named yabasic.flex). After that you could write "whenever (a<b) print a" instead of "if (a<b) print a" in yabasic.
The Bison input-file defines the grammar of yabasic. The grammar defines how tokens (acknowledged by Flex) must be arranged to yield a valid yabasic program. The grammar is a set of rules stating that "if (a<b) print a" is a valid yabasic statement, but "print a if (a<b)" is not. So if you think yabasic should understand "print a if (a<b)" you should try to change yabasic.bison.
To get a valid yabasic executable you need to compile and link several C-files, which include two header-files; two of the C-files are generated by flex or bison. Here they are all lumped together:
Here are some remarks about how yabasic organises its variables.
Yabasic keeps lists of all its variables (e.g. foo, bar$ as well as arrays). There is one list for all variables used within the (main) program and one list for each subroutine. The variable list for a subroutines is created, as soon as yabasic starts executing a subroutine and it is removed as soon as the subroutine is left. There will be many lists a any given time, because one subroutine may call another (or even itself).
At the beginning of the execution of a program (or subroutine), the corresponding variable list is empty until any statement references a variable (e.g. a=2). In this moment yabasic searches the list for a variable named "a" and will not find id (as the list is empty initially). Instead of complaining, yabasic will just create the variable "a" (with an initial value of 0).
Unfortunately this process of searching a variable within a list of variables is quite slow; to speed up things, yabasic remembers the location of each variable and stores it along with the command which references the variable. I.e. the internal representation of the command "a=2" would store not only the name of the variable "a", but also the exact position of this variable within yabasic's list of variables. The next time this command is executed, the variable need not be searched again, and access is quite fast.
However, this scheme is not perfect: Consider a subroutine; as said before each subroutine has its own list of variables (which keeps the variables local to this subroutine and all parameters). Therefore, if yabasic needs to find a variable within a subroutine, it searches within the local list of variables (and adds it there if necessary). And again, the location of the variable is stored with the command to speed up the next access. Now if the subroutine is done the local list of variables is removed, and therefore all references to those variables have to be invalidated, because the variables which they refer to are gone. Next time the subroutine is called, each variable has to be searched (and maybe created) again. So there is some time overhead in calling subroutines from within yabasic; however, this overhead should generally be made up by the improvement in program logic and readbility which can be achieved by using subroutines.
Handling of variables is so important that nearly the whole source file symbol.c deals with this topic; the relevant structures however are defined in yabasic.h:
struct symbol is the C-structure, which may store any variable (=symbol): numbers, strings or arrays. It has room to store a double value as well as a pointer to a string or to the elements of an array (for any given symbol only one of those is actually used). Furthermore it has pointers to be kept in a list of symbols associated with the main program or a subroutine.
struct symstack is used to keep the many lists of variables (=symbols), which might be active at any given time. Elements of type struct symstack form a linked list and each forms the head of a list of variables (elements of type struct symbol).
A list of variables is created by the function pushsymlist(); as soon as the subroutine to which the list belongs is done, the list is removed by popsymlist(). popsymlist() calls freesym() fro each symbol to free any memory associated with this symbol. The most important function however is get_sym() which searches the different lists of variables and searches for a named symbol; if the symbol is not found it might be created. The detailed behaviour of get_sym() is defined by the parameter add, which is of type addmodes (as defined in yabasic.h). It specifies, if an unknown symbol should be added, or an error should be returned; and if an unknown symbol is added, it might be added as a local or a global variable depending on the value of add.
In this example we will learn the steps necessary to add a new function to yabasic. The function foo$() serves as an example: It takes a single numeric argument and returns a string consisting of as many repetitions of the string "foo" as specified in the argument; i.e. foo$(2) would return "foofoo", which is quite silly but enough to learn the necessary steps.
Yabasic already has quite a bunch of functions so we may follow the path of some existing function, when adding our new function foo$(). A suitable function would be str$(), which takes a numeric argument and returns a string just as our prospected function foo$().
Assuming, that you are using linux (or some other Unix), do the following:
"FOO$" return tFOO;
| tFOO '(' expression ')' {create_function(fFOO);}
case fFOO:
pointer=my_foo((int) a1->value);
result=stSTRING;
break;
char *my_foo(int mult) {
char *res;
if (mult<0) {
error(ERROR,"negative values not allowed for function foo()");
return my_strdup("");
}
res=my_malloc(mult*4+1);
res[0]='\0';
for(i=0;i<mult;i++) strcat(res,"foo")
return res;
}
/* -------- local functions ---------*/
):
char *my_foo(int);
make flex
make bison
make
That's it ! Now all files are up to date. The new built of yabasic knows about the foo$()-function and is ready for extensive testing :-)
This example is considerably shorter than the first one, which you should have read in advance. Here you see how to implement the token()-function, which is already present in yabasic, so you may have a look at the sources for any details. You may use the token()-function like this:
dim w$(1)
n=split("one::two:thre::four",w$(),":")
print n
The array-parameter is the most interesting thing about the token()-function, so we will see how it is handled. The definitions in "yabasic.flex" are quite standard: see the first example for details about the necessary modifications. Therefore we will have a look at the definition in "yabasic.bison":
| tTOKEN '(' string_expression ',' string_arrayref ',' string_expression ')' {add_command(cTOKEN2,NULL);}
| tTOKEN '(' string_expression string_arrayref ',' ')' {add_command(cTOKEN,NULL);}
| tSPLIT '(' string_expression ',' string_arrayref ',' string_expression ')' {add_command(cSPLIT2,NULL);}
| tSPLIT '(' string_expression string_arrayref ',' ')' {add_command(cSPLIT,NULL);}
Note that token() and split() are defined twice, because each comes in two variants: With either two or three parameters (e.g. token("one::two",a$()) and token("one::two",a$(),":") ). These lines extend the definition of a yabasic-function (search for the string "function:"). All functions in yabasic are defined in the same region of the "yabasic.bison". Most of these lines contain a create_function()-statement (e.g. create_function(fSIN) ): This is the easiest way to define a function in yabasic (as you may see in the first example). However, token() and split() require a reference to an array among their arguments, which is uncommon for yabasic-functions, and therefore special commands (cTOKEN, cTOKEN2, cSPLIT, cSPLIT2) have been added. These commands then have to handle the array reference which is passed on the stack of yabasic. But before examining those functions more closely, we have to check the definition of string_arrayref, which appears in the lines above. Within "yabasic.bison" you will find:
string_arrayref: tSTRSYM '(' ')' {create_pusharrayref(dotify($1,FALSE),stSTRINGARRAYREF);}
This tells us, that an array reference is just a string symbol (e.g. foo$) followed by a pair of braces, i.e. something like foo$() . If such an array reference is found, the create_pusharrayref() is called; it is defined in symbol.c:
void create_pusharrayref(char *name,int type) /* create command 'cPUSHARRAYREF' */ { struct command *cmd; cmd=add_command(cPUSHARRAYREF,name); cmd->args=type; } void pusharrayref(struct command *cmd) /* push an array reference onto stack */ { struct stackentry *s; s=push(); s->type=cmd->args; s->pointer=my_strdup(cmd->name); }
create_pusharrayref()
does nothing special, it just calls add_command()
and
stores the name of the array (e.g. foo$()
) reference and its expected type
(reference to a numeric or a string array). create_pusharrayref()
is called
during parsing/compilation of the yabasic-program, wheras pusharrayref()
is
called during execution (you may search in "main.c" for "pusharrayref()"
to see how it is called). pusharrayref()
is quite trivial: It just takes the
name of the array (e.g. foo$()
) and pushes it onto the yabasic stack, where
it is ready to be used by token(). Lets look at some of the code defined in
"function.c":
void token(struct command *cmd) /* extract token from variable */
{
int split;
struct stackentry *s;
struct symbol *sym;
struct array *ar;
..... some definitions omitted .....
int num=0,i;
char *del,*line;
if (cmd->type==cSPLIT2 || cmd->type==cTOKEN2)
del=pop(stSTRING)->pointer;
else
del=" \t";
..... some lines omitted .....
s=pop(stSTRINGARRAYREF);
line=pop(stSTRING)->pointer;
sym=get_sym(s->pointer,syARRAY,amSEARCH);
if (!sym || !sym->pointer) {
sprintf(string,"array '%s()' is not defined",strip(s->pointer));
error(ERROR,string);
goto token_done;
}
ar=sym->pointer;
if (ar->dimension>1) {
error(ERROR,"only one dimensional arrays allowed");
goto token_done;
}
..... Many lines omitted .....
token_done:
s=push();
s->type=stNUMBER;
s->value=num;
}
Depending on the command (cTOKEN, cTOKEN2, cSPLIT or cSPLIT2) there are two or three parameters on the stack ( token("one::two",a$()) and token("one::two",a$(),":") both are valid ); therefore the string with delimiters ("del") is either popped from the stack or preset with a default value (" \t").
Next (and more interesting) an element of type stSTRINGARRAYREF is popped from the stack; this is just the name of the array (e.g. foo$() ), which has been pushed onto the stack before within pusharrayref() . The next step is to get the symbol which represents the array (see above for details on variables and symbols); this is done with get_sym(), which returns a pointer sym to a symbol structure (as defined in yabasic.h). If get_sym() returns NULL, the array (e.g. foo$() ) has not been defined. The symbol sym in turn contains a multi-purpose pointer (sym->pointer) which points to an array structure (as defined in yabasic.h). This pointer is assigned to the variable ar.
Now everything is prepared to do real work: A first step is to check, if the array, which has been passed is a one-dimensional array as expected. The next few lines of the token()-function are omitted: They split the string (pointed to by the variable line) into tokens and calculate the number of tokens within the variable num. This number is the result of the yabasic-function token() and is finally pushed onto the stack.


This quiet, peaceful town is situated on the east coast of Latvia, in the Gulf of Riga. This is a useful port of call now that the harbour has been deepened. The aproach chanel is well marked.
It lies about half way between Roja and Engure.
Position 57°20.7'N, 23°7.3'E.
The harbour is surrounded by piers, and there is no difficulties approaching the harbour.
A new yacht club with accomodation and pontoons has been built here in 2010.
The Yacht Centre is located at the head of the harbour, to port, just before bridge.
It is close to the town centre and all the facilities required.
April 2011.


--- layout: post title: Mike Rundle redesigns the header categories: - general author: admin published: true date: 2005-07-11 05:03:29.000000000 +01:00 ---
Mike Rundle didn’t like the header of this site and with the alternative he came up with, we don’t blame him. The new look is decidedly nicer than boring black-on-yellow. So it’s accepted and integrated. Much nicer. Thanks, Mike!


Boolean
Boolean: True or False.
Usage: Fewer than 10 domains
- Leave public feedback on this term 💬
- Check for open issues.
- 'Boolean' is mentioned in layer: core
- 'Boolean' is mentioned in extension layer: bib
Instances of Boolean may appear as values for the following properties
| Property | On Types | Description |
|---|---|---|
acceptsReservations
|
FoodEstablishment | Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, a URL at which reservations can be made or (for backwards compatibility) the strings Yes or No . |
isAccessibleForFree
|
PublicationEvent | A flag to signal that the publication is accessible for free. Supersedes free. |
isAvailableGenerically
|
Drug | True if the drug is available in a generic form (regardless of name). |
isFamilyFriendly
|
CreativeWork | Indicates whether this content is family friendly. |
isGift
|
Order | Was the offer accepted as a gift for someone other than the buyer. |
isLiveBroadcast
|
BroadcastEvent | True is the broadcast is of a live event. |
isProprietary
|
DietarySupplement or Drug | True if this item's name is a proprietary/brand name (vs. generic name). |
multipleValues
|
PropertyValueSpecification | Whether multiple values are allowed for the property. Default is false. |
readonlyValue
|
PropertyValueSpecification | Whether or not a property is mutable. Default is false. Specifying this for a property that also has a value makes it act similar to a "hidden" input in an HTML form. |
representativeOfPage
|
ImageObject | Indicates whether this image is representative of the content of the page. |
requiresSubscription
|
MediaObject | Indicates if use of the media require a subscription (either paid or free). Allowed values are true or false (note that an earlier version had 'yes', 'no'). |
value
|
PropertyValue or QuantitativeValue | The value of the quantitative value or property value node. For QuantitativeValue, the recommended type for values is 'Number'. For PropertyValue, it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'. |
valueAddedTaxIncluded
|
PriceSpecification | Specifies whether the applicable value-added tax (VAT) is included in the price specification or not. |
valueRequired
|
PropertyValueSpecification | Whether the property must be filled in to complete the action. Default is false. |
More specific DataTypes
Schema Version 2.2


Inside CSS boxes are margins, borders and paddings. Picture three boxe inside the page, within its centre lies the content. Padding refers to the space around the content, border refers to the space around the padding, and margin refers to the space around the border.
Using the CSS command margin, properties of top, right, bottom, and left can be used to adjust the margins. All the margin properties have values (such as % and length) that can help specify the margin in px, pt, cm and others.
CSS border command can be used to to adjust the style, width, and color of an element’s border. Different sides of the same border can even be displayed differently.
The CSS padding command can be used to create space around an element’s content, inside any borders. The length and percentage (displayed as %) can be used to adjust any or all sides of a padding.
Together, these three parts make up the CSS Box model. It is the box that wraps around any HTML element. These properties can be adjusted to create a variety of styles that would suit the content and design.
There are also shorthand commands that are used to shorten codes for these three elements.


PART I. GENERAL
Note
Sections 445-1 to 445-15 designated and amended as Part I by L 1990, c 164, §28.
Case Notes
Cited: 38 H. 433, 434 (1949).
§445-1 Definition: "Treasurer". Whenever used in this chapter "treasurer" means the treasurer or director of finance of any county of the State. [L 1896, c 64, §2; am imp L 1909, c 151, §1; RL 1925, §1955; RL 1935, §2400; RL 1945, §7001; RL 1955, §155-1; HRS §445-1]


Kriging and Gradient-Enhanced Kriging for VKI Lecture Series¶
Python module implementing interpolation with Gaussian process regression, a.k.a. Kriging. Features:
- Arbetrary dimensional interpolation.
- Use of gradients in reconstruction (Gradient Enhanced Kriging).
- Simple and univeral Kriging.
- Implementation follows Bayesian derivation of Kriging, descibed in the tutorial.
Note
This code was written for the Von Karman Institute lecture series on multi-disciplinary optimization, and is primarily intended as educational (accompanying the tutorial). As such it sacrifices many possible code optimizations to clarity. If you are planning to use it for applications, it may still be fast enough, depending on the size of your data. Preferentially use routines in the module Kriging and Gradient-Enhanced Kriging - version 2 (kriging_v2).
Installing¶
With git (recommended for educational use)¶
The package is pure Python 3. To get the source, clone the GitHub repository:
git clone https://github.com/rdwight/vkikriging.git
and add vkikriging to your PYTHONPATH
(e.g. with bash
):
export PYTHONPATH=/home/fred/vkikriging:$PYTHONPATH
You’ll need numpy
, scipy
, matplotlib
and algopy
(automatic differentiation).
I recommend using an Anaconda Python install.
With pip (recommended for applications)¶
The package is distributed via PyPI, so just use:
pip install vkikriging
Usage¶
For experimenting with cheap functions in 1d and 2d, use classes Example1d
and
class Example2d
, which have a simple interface and do some convenient plotting.
For expensive functions and/or higher dimensions use directly the routines of
Kriging and Gradient-Enhanced Kriging - version 2 (kriging_v2).
Basic usage with plotting (1d)¶
Using the class Example1d
you only have to specify a function, its derivative,
the locations of sample points, and parameters for the Kriging/GEK model. The following
approximates a sine curve on [-5,15] with 5 samples with gradients:
import numpy as np
import matplotlib.pyplot as plt
from vkikriging.example1d import Example1d
# 1. Initialize the function to approxiate, samples
# and Kriging paramters
ex1d = Example1d(np.sin, np.cos,
np.linspace(0, 10, 5),
gamma=1.0, sigma_d=0.001, sigma_dg=0.01,
xi_min=-5, xi_max=15)
# 2. Build the Kriging model, v1, v2 or v3. For v1,
# v2 GEK model is also built.
ex1d.build_surrogate_v1()
# 3. Plot the model, use any of all of the plot_* functions
fig = plt.figure(figsize=(10, 6))
ax = fig.add_subplot(111)
ex1d.plot_gek(ax)
ex1d.plot_posterior_samples_gek(ax)
ex1d.plot_reference(ax)
ex1d.plot_observed_gradients(ax, length=1.)
plt.show()
Some timing information is printed to stdout
, and the following figure is plotted:
The black curve is the exact function, black circles and lines are samples of the function and its derivative. The heavy blue line is the GEK mean, with 1,2,3-standard-deviation regions in light blue. The thin blue lines are 10 independent samples from the predictive distribution.
Basic usage with plotting (2d)¶
To achieve basic interpolation in 2d use the class Example2d
. This expects an
object describing the function, with attributes f
, df
, xmin
, xmax
,
and xopt
. See examples in Test functions for (global) optimization problems (test_functions). To approximate a
parabola with Sobol samples:
from vkikriging.test_functions import Parabola
from vkikriging.sampling import sobol
from vkikriging.example2d import Example2d
# 1. Initialize the function to approxiate, samples
# and Kriging paramters
f = Parabola()
xi = sobol(4, 2) * (f.xmax - f.xmin) + f.xmin
ex2d = Example2d(f, xi, gamma=1., sigma_d=0.01,
sigma_dg=0.01)
# 2. Build the Kriging model, v1, v2 or v3.
# For v1, v2 GEK model is also built.
ex2d.build_surrogate_v1()
# 3. Plot the model
ex2d.plot_contours()
Which produces the following figure:
The red circle is the exact minimum, and the crosses are the minima approximated by Kriging/GEK.
Higher-dimensions/expensive functions¶
The following code performs general-purpose sampling and reconstruction of a
d
-dimensional function, with convergence analysis on number of samples:
import numpy as np
import matplotlib.pyplot as plt
from vkikriging.kriging_v2 import Kriging, GEK
from vkikriging.sampling import halton, random_uniform
### 1. Example test-function (Genz function 1 - oscillatory)
dimension = 8
def f1(xi):
return np.cos(np.pi + np.sum(9./5 * xi))
def df1(xi):
return (-np.sin(np.pi + np.sum(9./5 * xi)) *
np.ones(dimension) * 9./5)
### 2. Reconstruction with varying number of samples
k_mses, gek_mses = [], []
nsamples = [10,20,50,100,200,500,1000]
for nsample in nsamples:
print(f'nsample = {nsample}')
# 2a. Choose samples (pseudo-random) on [0,1]^d, and
# evaluate function and derivatives
xi_samples = halton(nsample, dimension)
y = np.array([f1(xi) for xi in xi_samples])
dy = np.array([df1(xi) for xi in xi_samples])
# 2b. Build the Kriging/GEK models
kmodel = Kriging(xi_samples, y, sigma_y=0.01,
mu_x=0, sd_x=1, gamma=0.3)
gekmodel = GEK(xi_samples, y, dy, sigma_y=0.01,
sigma_dy=0.01, mu_x=0, sd_x=1, gamma=0.3)
# 2c. Use Kriging models to predict function at 1000
# random points
xi_predict = random_uniform(1000, dimension)
y_exact = np.array([f1(xi) for xi in xi_predict])
k_predict = kmodel.predict(xi_predict, posterior_cov=None)
gek_predict, _ = gekmodel.separate(
gekmodel.predict(xi_predict, posterior_cov=None))
# 2d. Compute mean-squared error of predition
k_mses += [np.sum((k_predict - y_exact)**2) / nsample]
gek_mses += [np.sum((gek_predict - y_exact)**2) / nsample]
### 3. Plot the convergence
plt.loglog(nsamples, k_mses, '-+b', label='Kriging')
plt.loglog(nsamples, gek_mses, '-+r', label='GEK')
plt.xlabel('number of samples')
plt.ylabel('mean-squared error')
plt.legend()
plt.show()
Which produces the following figure:
Documentation and API reference¶
- vkikriging package
- Prior covariance operators (covariance)
- Kriging and Gradient-Enhanced Kriging - version 1 (kriging_v1)
- Kriging and Gradient-Enhanced Kriging - version 2 (kriging_v2)
- Universal Kriging - version 3 (kriging_v3)
- Module of basic, generic functions (mylib)
- (Pseudo-)random sampling schemes on the unit hypercube (sampling)
- Test functions for (global) optimization problems (test_functions)
- Example surrogate modelling in 1d (vkikriging.example1d)
- Example surrogate modelling in 2d (vkikriging.example2d)


Cultural Blog Posts
Learning how to ask good questions
June 7, 2015
One of the most effective ways to learn is to figure out how to ask good questions and figure out how to connect with the people who will be able to figure out the right answer. I this cultural blog post, we're going to dive into: "who do I ask a good question?"
There are a couple tips to help ask the best questions, particularly on sites like StackOverflow where people are answering questions out of benevolence.
Think about the Pyramid Principle. Meaning, give the full punchline first. Then go into the details after that. With this approach the reader will be able to know which part of the code and / or problem you'd like for them to focus on.
Assume the ready is a "busy colleague," meaning they don't have a lot of time to read long sentences. Can you sum up your question in one sentence? Do you have errors or pictures you can include with the question for context?
One of the most important things is to continue asking the questions. If the first answer wasn't clear for you, continue to delve in and see if you can clarify. The optimal outcome is walking away from the conversation armed with more knowledge and confidence for how to approach the problem.


| Name: | {{company?.name}} |
| City: | {{company?.city}} |
| Address: | {{company?.address}} |
| PIB: | {{company?.pib}} |
| Number of employees: | {{company?.numberOfEmployees}} |
| Email: | {{company?.email}} |
| Web site: | {{company?.website}} |
| Work field | {{company?.workField}} |
| Specialty | {{company?.specialty}} |
| # | Name |
| {{i+1}} | {{o.name}} |


About Me
I was born in Paris to Korean parents and grew up in Africa: Cote d'Ivoire, Tunisia, Morocco and Cameroon. I came to the U.S. to get a degree in journalism, and have been based in New York for the past few years. I covered Asian technology companies for Reuters and most recently edited stories on China and Russia.
Quirkyland: I can prepare and cook a mean couscous in less than 30 minutes


We're sorry but medassistence doesn't work properly without JavaScript enabled. Please enable it to continue.


Joyful is a mobile application that aims to mend potential relationship gaps between the parent and their adult children. By giving the users another way to better convey and share their feelings, Joyful is designed for the opportunity to rebuild or strengthen our bonds with each other.
The ideation of this mobile application came about the desire to solve communication gaps between parents and their adult children. Our team was passionate about finding a way to bring healthy relationship to the forefront of our experiences in a way that that was delightful and undisruptive to our user’s lifestyle. Because of the naturally occurring circumstances that cause children to grow farther apart from their parents as they age, our domain was chosen to consist of independent adult children and parents who seek to solve past conflicts and maintain a healthy relationship with one another. Staging the user experience flow for our application was iterated to an experience map and journey flow map as follows:
The results of our user case studies suggested that our audience use mulitple social messaging applications and that they preferred to use ones they are already familiar with. Therefore to best suit our users needs, we needed to surround our application around the idea of sharing letters through different sns platforms. While working with this constraint, we also wanted to distinguish our app from other photo/message sharing apps by dedicating the app's experience primrarily for relationship building in a delightful manner. With a lot of competing ideas, we had to narrow our scope into two primary features that we thought would best suit this goal. We overcame this challenge best by the process of rapid prototyping & user testing. Through this process, we were able to immedietly grasp some gaps between our ideas and functionality, while also discovering UI problems along the way and solving them in a timely manner thanks to the implentation of our prototypes using Sketch and Flinto.
We proposed 2 primary features that embodied what we believed to be delightful and immersive: audiophotography notes and digtal letters. By combining audio and imagery in one, we hoped to invoke sentimtal experience that is both memorable and meaningful. Our digital letter feature making was another immersive touchpoint in which we designed it to be customizable through colors, texts and emojis that help our users best express themsleves. Additoinally, for guidance of use we created an onboarding experience by using videos and walk-through text that allowed our users to learn what this app was intended for. Our design decisions around our style guide was based on the feelings of joy and vibrant feelings.
In this project I did interaction design in Flinto, wireframing in Sketch, animation in Adobe After Effects and visual graphics in Adobe Illustrator.


NewsCompare.net
News Search (auto-filled for supported sites):
Search these websites for a similar article:
First news story:
Second news story:
Submit articles to NewsCompare.net


Combinatorial BLAS compilation instructions for NERSC resources.
1- First and foremost, make cmake active by running: module load cmake
2- In your CombBLAS_xx directory, rename CMakeLists_NERSC.txt to CMakeLists.txt, replacing the existing one.
3- (On Hopper only) Change the compiler to GNU, using the following command:
module swap PrgEnv-pgi PrgEnv-gnu
Now run "cmake ." , followed by "make"
For tests, you might want to run them through the interactive batch system via
> "qsub -I -V -q debug -l mppwidth=48"
> "cd $PBS_O_WORKDIR"
> "ctest -V"
Contact<EMAIL_ADDRESS>for questions/problems.


Warning: Active Lot
This lot has the following stock changes made on it that may be affected by any edits:
| Date |
Quantity |
| {{stockchange.date | date:'MMMM d, yyyy' }} |
{{stockchange.qty}} |
Affected stockchanges on other shipments: {{affected_stockchanges_total_count}} total


Contact
Full Name
Enter your email
How can we help?
Premier Pickleball Leagues
Club Play
General Info
Enter your message
Submit


AMAZING PEOPLE ARE MAKING AMAZING DESIGNS IN A FUN ENVIRONMENT
when you work with us, you are part of a team of committed collaborators.All aspects fo our software development process and integrated,interactive and agile.
our approach unifies design, development and product management to create exceptional products
We start by understanding your business goals, the user's needs and the product requirements
Then we help translate them into effective and elegant solutions
Before we can sign a contract or write a line of code our team will spend the necessary time needed to understand you product version.
The outcome of this scoping session is proposal or high-level statement of work.
based on your requirements, we can provide a complete offering or just the pieces you need.
Our design practice offers a full range of services including brand strategy, interaction and visual design and user experience testing.
your project, our designers create and implement visual design and workflows, solicit user feedback and work with you to make sure what gets built is what is needed.
All engineers are fluent in the latest enterprise, mobile and web development technologies.
They collaborate with your team to write, and improve code on a daily basis, using proven practices such as test-driven development and pair programming.
Planning and development is iterative. Because we are constantly coding and testing, the products we build are always ready to go live.
iterative process allows for changes as business requirements evolve.
Hello we have received your message. Thank you for reaching out to us.


The following classes are part of the input method client API:
In addition, the following classes and members in other frameworks support the input method client API:


Your Name
Your Description Here
Description continued
Education
Your School
Undergraduate | May 2019
Your Major, Degree
Your Minor
More Details Here
Work and Research
Work Experience 1
Position | Timeframe
Description
Description
Work Experience 2
Position | Timeframe
Description
Description
Skills
Proficient
Skill
Skill
Skill
Familiar
Skill
Skill
Skill


|
PMSIS BSP
|
Content | |
| Hyperflash | |
Data Structures | |
| struct | pi_flash_conf |
| Flash configuration structure. More... | |
| struct | pi_flash_info |
| Parameter for FLASH_IOCTL_INFO command. More... | |
Enumerations | |
| enum | pi_flash_ioctl_e |
| Command ID for pi_flash_ioctl. More... | |
Functions | |
| int | pi_flash_open (struct pi_device *device) |
| Open a flash device. More... | |
| static void | pi_flash_close (struct pi_device *device) |
| Close an opened flash device. More... | |
| static int32_t | pi_flash_ioctl (struct pi_device *device, uint32_t cmd, void *arg) |
| Control device. More... | |
| static void | pi_flash_reg_set (struct pi_device *device, uint32_t reg_addr, uint8_t *value) |
| Set flash register. More... | |
| static void | pi_flash_reg_get (struct pi_device *device, uint32_t reg_addr, uint8_t *value) |
| Get flash register. More... | |
| static void | pi_flash_reg_set_async (struct pi_device *device, uint32_t reg_addr, uint8_t *value, pi_task_t *task) |
| Set flash register asynchronously. More... | |
| static void | pi_flash_reg_get_async (struct pi_device *device, uint32_t reg_addr, uint8_t *value, pi_task_t *task) |
| Get flash register asynchronously. More... | |
| static void | pi_flash_read (struct pi_device *device, uint32_t pi_flash_addr, void *data, uint32_t size) |
| Enqueue a read copy to the flash (from flash to processor). More... | |
| static void | pi_flash_program (struct pi_device *device, uint32_t pi_flash_addr, const void *data, uint32_t size) |
| Enqueue a write copy to the flash (from processor to flash). More... | |
| static void | pi_flash_erase_chip (struct pi_device *device) |
| Erase the whole flash. More... | |
| static void | pi_flash_erase_sector (struct pi_device *device, uint32_t pi_flash_addr) |
| Erase a sector. More... | |
| static void | pi_flash_erase (struct pi_device *device, uint32_t pi_flash_addr, int size) |
| Erase an area in the flash. More... | |
| static void | pi_flash_read_async (struct pi_device *device, uint32_t pi_flash_addr, void *data, uint32_t size, pi_task_t *task) |
| Enqueue an asynchronous read copy to the flash (from flash to processor). More... | |
| static void | pi_flash_program_async (struct pi_device *device, uint32_t pi_flash_addr, const void *data, uint32_t size, pi_task_t *task) |
| Enqueue an asynchronous write copy to the flash (from processor to flash). More... | |
| static void | pi_flash_erase_chip_async (struct pi_device *device, pi_task_t *task) |
| Erase the whole flash asynchronously. More... | |
| static void | pi_flash_erase_sector_async (struct pi_device *device, uint32_t pi_flash_addr, pi_task_t *task) |
| Erase a sector asynchronously. More... | |
| static void | pi_flash_erase_async (struct pi_device *device, uint32_t pi_flash_addr, int size, pi_task_t *task) |
| Erase an area in the flash asynchronously. More... | |
The flash driver provides support for transferring data between an external flash chip (e.g. Hyperflash or SPI flash) and the processor running this driver.
| enum pi_flash_ioctl_e |
| Enumerator | |
|---|---|
| PI_FLASH_IOCTL_INFO | Command for getting flash information. The argument must be a pointer to a variable of type struct pi_flash_info so that the call is returning information there. |
|
inlinestatic |
This function can be called to close an opened flash device once it is not needed anymore, in order to free all allocated resources. Once this function is called, the device is not accessible anymore and must be opened again before being used.
| device | The device structure of the device to close. |
|
inlinestatic |
This will erase the specified area. The duration of this operation may be long and may be retrieved from the datasheet. If the flash only supports sector erasing, all the sectors partially or entirely covered by this aread will be erased. The caller is blocked until the operation is finished.
| device | The device descriptor of the flash chip on which to do the operation. |
| pi_flash_addr | The address of the area to be erased. |
| size | The size of the area to be erased. |
|
inlinestatic |
This will erase the specified area. The duration of this operation may be long and may be retrieved from the datasheet. If the flash only supports sector erasing, all the sectors partially or entirely covered by this aread will be erased. A task must be specified in order to specify how the caller should be notified when the transfer is finished.
| device | The device descriptor of the flash chip on which to do the operation. |
| pi_flash_addr | The address of the area to be erased. |
| size | The size of the area to be erased. |
| task | The task used to notify the end of transfer. See the documentation of pi_task_t for more details. |
|
inlinestatic |
This will erase the entire flash. The duration of this operation may be long and may be retrieved from the datasheet. The caller is blocked until the operation is finished.
| device | The device descriptor of the flash chip on which to do the operation. |
|
inlinestatic |
This will erase the entire flash. The duration of this operation may be long and may be retrieved from the datasheet. A task must be specified in order to specify how the caller should be notified when the transfer is finished.
| device | The device descriptor of the flash chip on which to do the operation. |
| task | The task used to notify the end of transfer. See the documentation of pi_task_t for more details. |
|
inlinestatic |
This will erase one sector. The duration of this operation may be long and may be retrieved from the datasheet. The caller is blocked until the operation is finished.
| device | The device descriptor of the flash chip on which to do the operation. |
| pi_flash_addr | The address of the sector to be erased. |
|
inlinestatic |
This will erase one sector. The duration of this operation may be long and may be retrieved from the datasheet. A task must be specified in order to specify how the caller should be notified when the transfer is finished.
| device | The device descriptor of the flash chip on which to do the operation. |
| pi_flash_addr | The address of the sector to be erased. |
| task | The task used to notify the end of transfer. See the documentation of pi_task_t for more details. |
|
inlinestatic |
This can be called to configure and control the device after it has been opened.
| device | The device structure of the device to control. |
| cmd | The command to execute on the device. |
| arg | The argument to the command. The size and meaning of this parameter depends on the command which is passed. |
| int pi_flash_open | ( | struct pi_device * | device | ) |
This function must be called before the flash device can be used. It will do all the needed configuration to make it usable and initialize the handle used to refer to this opened device when calling other functions. The configuration associated to the device must specify the exact model of flash which must be opened.
| device | A pointer to the device structure of the device to open. This structure is allocated by the called and must be kept alive until the device is closed. |
|
inlinestatic |
The copy will make a write transfer from one of the processor memory areas to the flash. The locations in the flash being written should have first been erased. The caller is blocked until the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.
| device | The device descriptor of the flash chip on which to do the copy. |
| pi_flash_addr | The address of the copy in the flash. |
| data | The address of the copy in the processor. |
| size | The size in bytes of the copy |
|
inlinestatic |
The copy will make a write transfer from one of the processor memory areas to the flash. The locations in the flash being written should have first been erased. A task must be specified in order to specify how the caller should be notified when the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.
| device | The device descriptor of the flash chip on which to do the copy. |
| pi_flash_addr | The address of the copy in the flash. |
| data | The address of the copy in the processor. |
| size | The size in bytes of the copy. |
| task | The task used to notify the end of transfer. See the documentation of pi_task_t for more details. |
|
inlinestatic |
The copy will make a transfer between the flash and one of the processor memory areas. The caller is blocked until the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.
| device | The device descriptor of the flash chip on which to do the copy. |
| pi_flash_addr | The address of the copy in the flash. |
| data | The address of the copy in the processor. |
| size | The size in bytes of the copy |
|
inlinestatic |
The copy will make a transfer between the flash and one of the processor memory areas. A task must be specified in order to specify how the caller should be notified when the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.
| device | The device descriptor of the flash chip on which to do the copy. |
| pi_flash_addr | The address of the copy in the flash. |
| data | The address of the copy in the processor. |
| size | The size in bytes of the copy. |
| task | The task used to notify the end of transfer. See the documentation of pi_task_t for more details. |
|
inlinestatic |
This can be called to get a flash register. The list of registers is specific to each flash, see the documentation of the flash for more information.
| device | The device structure of the flash. |
| reg_addr | The register address. |
| value | A pointer to the value where the read value will be stored. The size of this variable depends on the register being accessed. |
|
inlinestatic |
This can be called to get a flash register. The list of registers is specific to each flash, see the documentation of the flash for more information. A task must be specified in order to specify how the caller should be notified when the operation is finished.
| device | The device structure of the flash. |
| reg_addr | The register address. |
| value | A pointer to the value where the read value will be stored. The size of this variable depends on the register being accessed. |
| task | The task used to notify the end of transfer. See the documentation of pi_task_t for more details. |
|
inlinestatic |
This can be called to set a flash register. This must be used carefully as this can disturb the behavior of the other calls. The list of registers is specific to each flash, see the documentation of the flash for more information.
| device | The device structure of the flash. |
| reg_addr | The register address. |
| value | A pointer to the value to be set. The size of this variable depends on the register being accessed. |
|
inlinestatic |
This can be called to set a flash register. This must be used carefully as this can disturb the behavior of the other calls. The list of registers is specific to each flash, see the documentation of the flash for more information. A task must be specified in order to specify how the caller should be notified when the operation is finished.
| device | The device structure of the flash. |
| reg_addr | The register address. |
| value | A pointer to the value to be set. The size of this variable depends on the register being accessed. |
| task | The task used to notify the end of transfer. See the documentation of pi_task_t for more details. |


Captain, why are we out here chasing comets? Talk about going nowhere fast. The game's not big enough unless it scares you a little. Your head is not an artifact!
I've had twelve years to think about it. And if I had it to do over again, I would have grabbed the phaser and pointed it at you instad og them
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
Computer, belay that order. Hear is the true enemy, the only enemy. Your shields were failing, sir. Fate. It protects fools, little childrens, and ships named Enterprise. "I'll alert the crew. The Enterprise computer system is conrolled by the primary main processor cores, cross-linked with a redundant melacortz ramistat, fourteen kiloquad interface modules. We have a saboteur aboard.
Computer, belay that order. Hear is the true enemy, the only enemy. Your shields were failing, sir. Fate. It protects fools, little childrens, and ships named Enterprise. "I'll alert the crew. The Enterprise computer system is conrolled by the primary main processor cores, cross-linked with a redundant melacortz ramistat, fourteen kiloquad interface modules. We have a saboteur aboard.
Computer, belay that order. Hear is the true enemy, the only enemy. Your shields were failing, sir. Fate. It protects fools, little childrens, and ships named Enterprise. "I'll alert the crew. The Enterprise computer system is conrolled by the primary main processor cores, cross-linked with a redundant melacortz ramistat, fourteen kiloquad interface modules. We have a saboteur aboard.


A small package for reading SEER fixed width files.
The main workhorse of this package is seer_read_fwf()
. This function wraps readr::read_fwf()
to import the SEER fixed-width ASCII data files, using the column names and field width definitions in the SEER SAS script.
The data files are available from the SEER Data & Software page, where users must request access prior to downloading. The SAS script is included in the file download, or avilable online. The online version is used by seer_read_fwf()
, but a local version can be specified in the helper function seer_read_col_positions("local_file.sas")
.
Two additional functions are provided to help recode the SEER data. seer_recode()
uses the seer_data_dictionary
data provided in this package to automatically recode all variables with a one-to-one correspondence, for example:
seer_data_dictionary$SEX
#> # A tibble: 2 x 2
#> Code Description
#> * <chr> <chr>
#> 1 1 Male
#> 2 2 Female
The package also includes the function seer_rename_site_specific()
that can be used to replace the site-specific variables with their corresponding labels, formatted appropriately to serve as variable names. As an example, CSSSF variables for Breast cancer would be renamed according to the following table.
| Original Variable | New Variable Name |
|---|---|
CS1SITE |
estrogen_receptor_er_assay_2004 |
CS2SITE |
progesterone_receptor_pr_assay_2004 |
CS3SITE |
number_of_positive_ipsilateral_level_i_ii_axillary_lymph_nodes_2004 |
CS4SITE |
immunohistochemistry_ihc_of_regional_lymph_nodes_2004 |
CS5SITE |
molecular_mol_studies_of_regional_lymph_nodes_2004 |
CS6SITE |
size_of_tumor_invasive_component_2004 |
CS7SITE |
nottingham_or_bloom_richardson_br_score_grade_2010 |
CS15SITE |
her_2_summary_result_of_testing_2010 |
Thank you to Vincent Major for making available the scripts in SEER_read_fwf, which provided a foundation for this package.


The theta of an option, θ, is defined as the rate of change of the option price respected to the passage of time:
where π is the option price and t is the passage of time.
If τ=T-t, theta (θ) can also be defined as minus one timing the rate of change of the option price respected to time to maturity. The derivation of such transformation is easy and straight forward:
where τ=T-t is time to maturity. For the derivation of theta for various kinds of stock option, we use the definition of negative differential on time to maturity.
For a European call option on a non-dividend stock, theta can be written as:
The derivation of (13) is
For a European put option on a non-dividend stock, theta can be shown as
The derivation of (14) is
For a European call option on a dividend-paying stock, theta can be shown as
The derivation of (15) is
For a European call option on a dividend-paying stock, theta can be shown as
The derivation of (16) is
The value of option is the combination of time value and stock value. When time passes, the time value of the option decreases. Thus, the rate of change of the option price with respective to the passage of time, theta, is usually negative.
Because the passage of time on an option is not uncertain, we do not need to make a theta hedge portfolio against the effect of the passage of time. However, we still regard theta as a useful parameter, because it is a proxy of gamma in the delta neutral portfolio. For the specific detail, we will discuss in the following sections.
The gamma of an option, Γ , is defined as the rate of change of delta respected to the rate of change of underlying asset price:
where Π is the option price and S is the underlying asset price.
Because the option is not linearly dependent on its underlying asset, delta-neutral hedge strategy is useful only when the movement of underlying asset price is small. Once the underlying asset price moves wider, gamma-neutral hedge is necessary. We next show the derivation of gamma for various kinds of stock option.
For a European call option on a non-dividend stock, gamma can be shown as
The derivation of (17) is
For a European put option on a non-dividend stock, gamma can be shown as
The derivation of (18) is
For a European call option on a dividend-paying stock, gamma can be shown as
The derivation of (19) is
For a European call option on a dividend-paying stock, gamma can be shown as
The derivation of (20) is
One can use delta and gamma together to calculate the changes of the option due to changes in the underlying stock price. This change can be approximated by the following relations.
From the above relation, one can observe that the gamma makes the correction for the fact that the option value is not a linear function of underlying stock price. This approximation comes from the Taylor series expansion near the initial stock price. If we let V be option value, S be stock price, and S0 be initial stock price, then the Taylor series expansion around S0 yields the following.
If we only consider the first three terms, the approximation is then,
For example, if a portfolio of options has a delta equal to $10000 and a gamma equal to $5000, the change in the portfolio value if the stock price drop to $34 from $35 is approximately,
The above analysis can also be applied to measure the price sensitivity of interest rate related assets or portfolio to interest rate changes. Here we introduce Modified Duration and Convexity as risk measure corresponding to the above delta and gamma. Modified duration measures the percentage change in asset or portfolio value resulting from a percentage change in interest rate.
Using the modified duration,
we can calculate the value changes of the portfolio. The above relation corresponds to the previous discussion of delta measure. We want to know how the price of the portfolio changes given a change in interest rate. Similar to delta, modified duration only show the first order approximation of the changes in value. In order to account for the nonlinear relation between the interest rate and portfolio value, we need a second order approximation similar to the gamma measure before, this is then the convexity measure. Convexity is the interest rate gamma divided by price,
                                                    Convexity = Γ/P
and this measure captures the nonlinear part of the price changes due to interest rate changes. Using the modified duration and convexity together allow us to develop first as well as second order approximation of the price changes similar to previous discussion.
As a result, (-duration x P) and (convexity x P) act like the delta and gamma measure respectively in the previous discussion. This shows that these Greeks can also be applied in measuring risk in interest rate related assets or portfolio.
Next we discuss how to make a portfolio gamma neutral. Suppose the gamma of a delta-neutral portfolio is Γ , the gamma of the option in this portfolio is Γ0 , and ω0 is the number of options added to the delta-neutral portfolio. Then, the gamma of this new portfolio is
                                                    ω0Γ0 + Γ
To make a gamma-neutral portfolio, we should trade ω0* = -Γ/-Γ0 options. Because the position of option changes, the new portfolio is not in the delta-neutral. We should change the position of the underlying asset to maintain delta-neutral.
For example, the delta and gamma of a particular call option are 0.7 and 1.2. A delta-neutral portfolio has a gamma of -2,400. To make a delta-neutral and gamma-neutral portfolio, we should add a long position of 2,400/1.2=2,000 shares and a short position of 2,000 x 0.7=1,400 shares in the original portfolio.


SIMON
☰
Home
About
Website Resources
Github
Web Resources
Some cool things for the web
Stuff here.
Share


{% extends 'users/base_user.html' %} {% block title %} {{ block.super }} - Account Created {% endblock title %} {% block content %}
Your Account has been created!
Please check your email for the activation link.


M1 Mac Mini
After the issues I’ve had previously with the Mac, I wasn’t sure I was going to get another Mac. But I did.
I watched the M1 release keynote after it had finished and was impressed with what I saw. If it was true. However, after hanging around the Mac Power Users forum, I’d seen some interesting Mac apps that I fancied giving a go - things like Hook. I also wanted to continue using Photos, as I hadn’t really found an alternative on Windows that really matched it.
Well, with the reduction in price of the Mac Mini and with education discount, I thought being on the cutting edge would be worth being part of - after all, I’d been impressed with the Raspberry Pi’s and they’re ARM based processors and I knew they were pretty capable devices.
Base Model
I purchased the base model Mac Mini in the end - it was the cheapest M1 Mac, so it would give me a chance to dip my toe in to the water and see what I was getting in to. With the education discount, it was quite reasonable.
M1 Software
So far, I’ve not really come across any software issues from running an M1 Mac. Some QNAP software for an external drive caddy hasn’t worked, but once setup on Windows, that has worked fine on Mac.
All the Apple apps work fine, but Firefox has some issues here and there. I have downloaded the newest beta, which is a Universal app and works on the Mac without issues.
The biggest issue I’ve had is with Ondrive. Setting it up, it ran in to issues. However, I believe this was due to the fact that I had it as an Arq backup destination and therefore there was a huge number of files stored on the server that it was looking over. I wasn’t able to do a selective sync on startup and then the program would crash. However, once the initial sync had been completed, Onedrive works fine without issues.
iOS/iPad Apps
A selling point that Apple made was the ability to run iPad and iOS apps. In reality, as others have already said, this isn’t a great draw. In my view, a lot of the iPad apps I would want to use have macOS counterparts, but then others that don’t have a Mac app have been removed from the App Store1. However, there are some exceptions.
One of the big ones is that Overcast, my podcast app of choice, now works on the Mac. This is a big plus for me. I’d been back and forth between Overcast and Pocketcasts for ages, but what kept dragging me back to Pocketcasts was the ability to listen online via the website.
This works nicely with the media keys on my keyboard - play and pause work without issues. It can download the stream if I wanted as well and just generally works as I would hope it would on the Mac.
The second app is Foodnoms. I used to track food via Myfitnesspal, but haven’t for a number of years. I’m now trying to get back to tracking and losing some weight and had been disappointed with the changes made to Myfitnesspal - I also didn’t like the social features of Myfitnesspal.
Foodnoms however, is ideal. It saves the data to my iPhone/iCloud account and means that I’m in control, so if the data is wrong, no one is to blame but myself! I can link to a wider database, but once I start populating with my data, it works and I don’t need the wider database.
Whilst I might have my phone nearby, sometimes you need to log whilst with a keyboard2. This is where having this on the Mac comes in handy. This means it’s a true replacement for Myfitnesspal, as I don’t need to access the website, but can edit whilst at the Mac still.
Conclusions
Overall, the M1 Mac and Big Sur is decent upgrade over my previous experience with macOS. Issues I had previously are either resolved or have been narrowed down to hardware I was using.
The only downside for the current Mac Mini is the reduced number of USB ports, with the M1 only having two USB C ports, compared to the previous 4 on the Intel ones. However, a USB hub sorts this out and lets me use a number of devices - in addition to using some Bluetooth accessories that I previously hadn’t.


There's enough variety here
to keep you thrilled.
Chicken and rice go well together
in everything from casseroles to soups.
May be simpler to follow
than other diet.
Whether you're craving classic
steak and potatoes
From stuffed shells to shepherd's
pie, these dishes are supremely
satisfying.
It’s not that is too much prep
work or that it takes too much time.


Hey there,
You got invited from {{inviter}} to join {{appName}}.
To join, please follow the link: {{url}}
This invitation will be valid for one week, until {{inviteTokenExpires}}.
The {{appName}} Support Team


Fishing Guild Member Batidae:
Hey, good to see you! You came here to fish, right?
Well, it's a better way to spend an afternoon than breaking your back in some dark and dank mine!
Ask how to fish.
Fishing Contest
Learn fishing skill.
Buy/Sell/Refund.
Sell fish.
View information about the local lord and tax rate.
Quest


Items in your cart
PASSION
FUN
ENJOY
About Us
Specialising in vinyl records & graffiti/street art products City opened its doors as a small record and graff supplies store back in July 2001. Back then we were up above Purple Moon records a little further down the cobbled streets of Dublin’s Temple Bar Area.
In addition to this we run a yearly graffiti / skate / bmx Jam in Dublin's Tivoli Theatre Car Park. All City is the Irish distributor for Montana Colors, On The Run Products, Grog Ink and Krink amongst others<EMAIL_ADDRESS>We promote music gigs and are always involved in some way shape or form with anyone of the myriad of graff jams which take place up and down the country. If you're in the area - Do drop in!