on 10-Aug-2014 (Sun)

Annotation 149625039

#calculus #economics #mathematics
Constant slope does not imply constant elasticity. To see this, consider the linear demand function Q=a-bP, which has constanst slope equal -b. But the elasticity implied by this demand function is E=(dQ/dP)(P/Q)=-b(P/Q). Since the ratio P/Q gets smaller and smaller as Q increases, demand is more leastic at high prices and less elastic at low prices.

Elasticity vs. Slope?
Best Answer helper answered 5 years ago <span>Constant slope does not imply constant elasticity. To see this, consider the linear demand function Q=a-bP, which has constanst slope equal -b. But the elasticity implied by this demand function is E=(dQ/dP)(P/Q)=-b(P/Q). Since the ratio P/Q gets smaller and smaller as Q increases, demand is more leastic at high prices and less elastic at low prices. This makes intuitive sense, since it is reasonable that quantity demanded is more sensitive at high prices than it is at low prices. A demand function of the form Q=b/P is called a constant elasticity demand function. To see this, note that E=(dQ/dP)(P/Q)=(-b/P^2)(P/Q)=(-b/P^2)(P/... a constant. More generally, if

Flashcard 149627805

Tags
Question
For example, if the T-bill rate is 5.10% and ED trades at 5.50%, the TED spread is [...]bps.
40

status measured difficulty not learned 37% [default] 0

Parent (intermediate) annotation

Open it
For example, if the T-bill rate is 5.10% and ED trades at 5.50%, the TED spread is 40 bps.

Original toplevel document

TED spread - Wikipedia, the free encyclopedia
ge dropped T-bill futures after the 1987 crash,[1] the TED spread is now calculated as the difference between the three-month LIBOR and the three-month T-bill interest rate. The size of the spread is usually denominated in basis points (bps). <span>For example, if the T-bill rate is 5.10% and ED trades at 5.50%, the TED spread is 40 bps. The TED spread fluctuates over time but generally has remained within the range of 10 and 50 bps (0.1% and 0.5%) except in times of financial crisis. A rising TED spread often presages a

Flashcard 149627812

Tags
Question
For example, if the T-bill rate is 5.10% and ED trades at [...], the TED spread is 40 bps.
5.50%

status measured difficulty not learned 37% [default] 0

Parent (intermediate) annotation

Open it
For example, if the T-bill rate is 5.10% and ED trades at 5.50%, the TED spread is 40 bps.

Original toplevel document

TED spread - Wikipedia, the free encyclopedia
ge dropped T-bill futures after the 1987 crash,[1] the TED spread is now calculated as the difference between the three-month LIBOR and the three-month T-bill interest rate. The size of the spread is usually denominated in basis points (bps). <span>For example, if the T-bill rate is 5.10% and ED trades at 5.50%, the TED spread is 40 bps. The TED spread fluctuates over time but generally has remained within the range of 10 and 50 bps (0.1% and 0.5%) except in times of financial crisis. A rising TED spread often presages a

Flashcard 149627843

Tags
#finance #swaps
Question
An overnight indexed swap (OIS) is an interest rate swap where the periodic floating rate of the swap is equal [...].
to the geometric average of an overnight rate (or overnight index rate) over every day of the payment period

status measured difficulty not learned 37% [default] 0

Parent (intermediate) annotation

Open it
An overnight indexed swap (OIS) is an interest rate swap where the periodic floating rate of the swap is equal to the geometric average of an overnight rate (or overnight index rate) over every day of the payment period.

Original toplevel document

Overnight indexed swap - Wikipedia, the free encyclopedia
ader:filter:minify-css:7:3904d24a08aa08f6a68dc338f9be277e */ Overnight indexed swap From Wikipedia, the free encyclopedia Jump to: navigation, search <span>An overnight indexed swap (OIS) is an interest rate swap where the periodic floating rate of the swap is equal to the geometric average of an overnight rate (or overnight index rate) over every day of the payment period. The index rate is typically the rate for overnight unsecured lending between banks, for example the Federal funds rate for US dollars, Eonia for Euros or Sonia for sterling. The fixed ra

Flashcard 149627851

Tags
#bonds #duration #finance
Question
DV01 is short for "dollar value of an [...].
01" (or 1 basis point)

status measured difficulty not learned 37% [default] 0

Parent (intermediate) annotation

Open it
DV01 is short for "dollar value of an 01" (or 1 basis point).

Original toplevel document

Bond duration - Wikipedia, the free encyclopedia
nit change in input (a basis point of yield). Dollar duration or DV01 is the change in price in dollars, not in percentage. It gives the dollar variation in a bond's value per unit change in the yield. It is often measured per 1 basis point - <span>DV01 is short for "dollar value of an 01" (or 1 basis point). The names BPV (basis point value) or PV01 (present value of an 01) are also used, although PV01 more accurately refers to the value of a one dollar or one basis point annuity. (For a par

Annotation 149627868

#java #java8 #lambda-expressions
For anonymous class ‘this’ keyword resolves to anonymous class, whereas for lambda expression ‘this’ keyword resolves to enclosing class where lambda is written.

Java 8 Lambda Expressions Tutorial. Lambda Expression Java
ist.stream().map(x -> x*x).reduce((x,y) -> x + y).get(); System.out.println(sum); Difference between Lambda Expression and Anonymous classOne key difference between using Anonymous class and Lambda expression is the use of this keyword. <span>For anonymous class ‘this’ keyword resolves to anonymous class, whereas for lambda expression ‘this’ keyword resolves to enclosing class where lambda is written.Another difference between lambda expression and anonymous class is in the way these two are compiled. Java compiler compiles lambda expressions and convert them into private method of t

Annotation 149627875

#java #java8 #lambda-expressions
a Functional Interface is an interface with just one abstract method declared in it.

Java 8 Lambda Expressions Tutorial. Lambda Expression Java
eturned within the code block, or void if nothing is returned.What are Functional InterfacesIn Java, a Marker interface is an interface with no methods or fields declaration. In simple words, marker interface is an empty interface. Similarly, <span>a Functional Interface is an interface with just one abstract method declared in it.java.lang.Runnable is an example of a Functional Interface. There is only one method void run() declared in Runnable interface. Similarly ActionListener interface is also a Functional In

Annotation 149627892

How lambda expressions work under the hood?
#java #java8 #lambda-expressions
How lambda expressions work under the hood?
It might look like the lambda expressions are just the syntax sugar for anonymous inner classes, but there is much more elegant approach. The simplest explanation is: the lambda expression is represented by a new method, and it is invoked at run-time using invokedynamic.
Source code:
class LambdaExample {

public void abc() {
Runnable r = () -> {
System.out.println("hello");
}
r.run();
}

}

Bytecode equivalent:
class LambdaExample {

public void abc() {
Runnable r = <lambda$1 as Runnable instance>; r.run(); } static void lambda$1() {
System.out.println("hello");
}

}

Inside the JVM, there is a lambda factory that creates an instance of the functional interface (e.g. Runnable) from the generated lambda method (e.g. lambda\$1).

Annotation 149627912

#horstmann-java8-for-really-impatient #java #java8 #lambda-expressions
You can’t even assign a lambda expression to a variable of type Object—Object is not a functional interface.

pdf

cannot see any pdfs

Flashcard 149627919

Tags
#horstmann-java8-for-really-impatient #java #java8 #lambda-expressions
Question
What lambda expression is object::instanceMethod equivalent to?
(x, y, ...) -> object.instanceMethod(x, y, ....)

status measured difficulty not learned 37% [default] 0

pdf

cannot see any pdfs

Flashcard 149627946

Tags
#horstmann-java8-for-really-impatient #java #java8 #lambda-expressions
Question
What lambda expression is Math::pow equivalent to?
(x, y) -> Math.pow(x, y)

status measured difficulty not learned 37% [default] 0

pdf

cannot see any pdfs

Flashcard 149627965

Tags
#horstmann-java8-for-really-impatient #java #java8 #lambda-expressions
Question
What lambda expression is String::compareToIgnoreCase (careful, it is an instance method) equivalent to?
(x, y) -> x.compareToIgnoreCase(y)

status measured difficulty not learned 37% [default] 0

pdf

cannot see any pdfs

Annotation 149627985

#horstmann-java8-for-really-impatient #java #java8 #lambda-expressions
The body of a lambda expression has the same scope as a nested block.

pdf

cannot see any pdfs

Flashcard 149627992

Tags
#horstmann-java8-for-really-impatient #java #java8 #lambda-expressions
Question

public class Application() {
public void doWork() {
Runnable runner = () -> { ...; System.out.println(this.toString()); ... };
//...
}
}


Does this in this.toString() refer to Application or Runnable?
Application

status measured difficulty not learned 37% [default] 0

pdf

cannot see any pdfs

Annotation 149628012

#default-methods #horstmann-java8-for-really-impatient #java #java8
If a superclass provides a concrete method, default methods with the same name and parameter types are simply ignored. Superclasses win.

pdf

cannot see any pdfs

Annotation 149628028

#default-methods #horstmann-java8-for-really-impatient #java #java8
Interfaces clash. If a superinterface provides a default method, and another interface supplies a method with the same name and parameter types (default or not), then you must resolve the conflict by overriding that method.

pdf

cannot see any pdfs

Annotation 149628044

#default-methods #horstmann-java8-for-really-impatient #java #java8
You can never make a default method that redefines one of the methods in the Object class. For example, you can’t define a default method for toString or equals, even though that might be attractive for interfaces such as List. As a consequence of the “classes win” rule, such a method could never win against Object.toString or Object.equals.

pdf

cannot see any pdfs

Annotation 149628060

#horstmann-java8-for-really-impatient #java #java8
code to count words where length > 12 in traditional way:

int count = 0;
for (String w : words) {
if (w.length() > 12) count++;
}

in Java 8 would look like this:

count = words.stream().filter(w -> w.length() > 12).count();



pdf

cannot see any pdfs

Annotation 149628076

#horstmann-java8-for-really-impatient #java #java8
to parallelise search for words here:

count = words.stream().filter(w -> w.length() > 12).count();


you would change a method stream() to parallelStream()

pdf

cannot see any pdfs

Annotation 149628092

#horstmann-java8-for-really-impatient #java
In Java 8 you can turn any collection into a stream with the stream() from the Collection interface.

pdf

cannot see any pdfs

Annotation 149628108

#horstmann-java8-for-really-impatient #java
In Java 8 you can turn any array into a stream with the static Stream.of() method.

pdf

cannot see any pdfs

Annotation 149628124

#horstmann-java8-for-really-impatient #java #java8
To generate infinite stream from a stateless function, you use Stream.generate()

pdf

cannot see any pdfs

Annotation 149628140

#horstmann-java8-for-really-impatient #java #java8
Stream.iterate() generates an infinite stream from a "seed" (initial value) and then a function repeatedly applied to previous result.

pdf

cannot see any pdfs

Annotation 149628156

#horstmann-java8-for-really-impatient #java #java8
The Collections.sort method sorts a collection in place, whereas Stream.sorted returns a new sorted stream.

pdf

cannot see any pdfs

Annotation 149628172

#horstmann-java8-for-really-impatient #java #java8
The Optional.flatMap method works in the same way as Stream.flatMap if you consider an optional value to be a stream of size zero or one.

pdf

cannot see any pdfs

Article 149628195

#horstmann-java8-for-really-impatient #java #java8 #p26

You may find a flatMap method in classes other than streams. It is a general concept in computer science. Suppose you have a generic type G (such as Stream) and functions f from some type T to G<U> and g from U to G<V>. Then you can compose them, that is, first apply f and then g, by using flatMap. This is a key idea in the theory of monads.