Edited, memorised or added to reading queue

on 19-Dec-2014 (Fri)

Do you want BuboFlash to help you learning these things? Click here to log in or create user.

Flashcard 149623338

Tags
#asset-swap #finance
Question
Asset swap (type - par-par) is a difference between [...]and implied strip price of the same bond (implied price of cashflows against a specific yield curve), quoted as the spread on the floating swap side that matches the maturity of the bond.
Answer
bond quoted price

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
calculating asset swap spread
Asset swap is a difference between bond quoted price and implied strip price of the same bond (implied price of cashflows against a specific yield curve), quoted as the spread on the floating swap side that matches the maturity of the bond







Flashcard 149623345

Tags
#asset-swap #finance
Question
Asset swap (type: par-par) is a difference between bond quoted price and [...], quoted as the spread on the floating swap side that matches the maturity of the bond.
Answer
implied strip price of the same bond (implied price of cashflows against a specific yield curve)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
calculating asset swap spread
Asset swap is a difference between bond quoted price and implied strip price of the same bond (implied price of cashflows against a specific yield curve), quoted as the spread on the floating swap side that matches the maturity of the bond.







Flashcard 149623352

Tags
#asset-swap #finance
Question
Asset swap (type: par-par) is a difference between bond quoted price and implied strip price of the same bond (implied price of cashflows against a specific yield curve), quoted as [...].
Answer
the spread on the floating swap side that matches the maturity of the bond

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
calculating asset swap spread
Asset swap is a difference between bond quoted price and implied strip price of the same bond (implied price of cashflows against a specific yield curve), quoted as the spread on the floating swap side that matches the maturity of the bond.







Flashcard 149623398

Tags
#asset-swap #finance
Question
Asset swap (type: [...]) is a difference between bond quoted price and implied strip price of the same bond (implied price of cashflows against a specific yield curve), quoted as the spread on the floating swap side that matches the maturity of the bond.
Answer
par-par (type "market" has similar structure, but par-par has non-zero PV, while market has 0 PV)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
calculating asset swap spread (par-par)
Asset swap (type: market - same structure as par-par but at different price) is a difference between bond quoted price and implied strip price of the same bond (implied price of cashflows against a specific yield curve), quoted as the spread on the floating swap







Flashcard 149630773

Tags
#odersky-programming-in-scala-2ed #scala
Question
How can you make the function literal more concise?
someNumbers.filter(x => x > 0)
Answer
someNumbers.filter(_ > 0)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149630784

Tags
#odersky-programming-in-scala-2ed #scala
Question
How to fix this compilation error?
scala> val f = _ + _
<console>:4: error: missing parameter type for expanded
function ((x$1, x$2) => x$1.$plus(x$2))
   val f = _ + _
Answer
Add types, e.g.:

val f = (_: Int) + (_: Int)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







#odersky-programming-in-scala-2ed #scala
Multiple underscores mean multiple parameters, not reuse of a single parameter repeatedly. The first underscore represents the first parameter, the second underscore the second parameter, the third underscore the third parameter, and so on.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 149630859

Tags
#odersky-programming-in-scala-2ed #scala
Question
val b = sum(1, _: Int, 3)
What is b? How is it created in the example above?
Answer
a function (or a "function value") of one argument, integer (function value to be specific). it is created by partial application of sum function

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







#odersky-programming-in-scala-2ed #scala
the type of args inside the function, which is declared as type “String*” is actually Array[String]
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 149630917

Tags
#odersky-programming-in-scala-2ed #scala
Question
How to call this function?
def echo(args: String*) =
  for (arg <- args) println(arg)
Answer
with any number of comma separated strings, e.g. echo("hello", "world!")

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







#odersky-programming-in-scala-2ed #scala
It is also to mix positional and named arguments. In that case, the positional arguments come first.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 149630970

Tags
#odersky-programming-in-scala-2ed #scala
Question
How to add Console.out as a default value for out parameter?
def printTime(out: java.io.PrintStream) =
  out.println("time = "+ System.currentTimeMillis())
Answer
def printTime(out: java.io.PrintStream = Console.out) =
  out.println("time = "+ System.currentTimeMillis())

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







#odersky-programming-in-scala-2ed #scala
tail-call optimization is limited to situations in which a method or nested function calls itself directly as its last operation, without going through a function value or some other intermediary.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 149630997

Tags
#odersky-programming-in-scala-2ed #scala
Question
What is function value?
Answer
A result of partial application of a function without supplying any arguments, e.g.
val funValue = nestedFun _

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149631008

Tags
#odersky-programming-in-scala-2ed #scala
Question
Explain the second argument of the filesMatching function
def filesMatching(query: String,
    matcher: (String, String) => Boolean) = {
  for (file <- filesHere; if matcher(file.getName, query))
    yield file
}
Answer
It is a function (specifically function value) that takes 2 Strings as arguments and return Boolean

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149631019

Tags
#odersky-programming-in-scala-2ed #scala
Question
How can I simplify the syntax of a call to filesMatching inside filesEnding?

def filesEnding(query: String) =
  filesMatching(query, (fileName: String, query: String) => fileName.endsWith(query))

def filesMatching(query: String,
    matcher: (String, String) => Boolean) = {
  for (file <- filesHere; if matcher(file.getName, query))
    yield file
}
Answer
def filesEnding(query: String) =
  filesMatching(query, _.endsWith(_))


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149631030

Tags
#odersky-programming-in-scala-2ed #scala
Question
How can you simplify this code using closure to avoid passing query as an argument to filesMatching, where filesEnding is the public API client function?

def filesEnding(query: String) =
  filesMatching(query, _.endsWith(_))

def filesMatching(query: String,
    matcher: (String, String) => Boolean) = {
  for (file <- filesHere; if matcher(file.getName, query))
    yield file
}
Answer

def filesEnding(query: String) =
  filesMatching(_.endsWith(query))

def filesMatching(matcher: String => Boolean) =
  for (file <- filesHere; if matcher(file.getName))
    yield file


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149631041

Tags
#odersky-programming-in-scala-2ed #scala
Question
How to rewrite this using curried function (using compact notation)?
scala> def plainOldSum(x: Int, y: Int) = x + y
plainOldSum: (x: Int,y: Int)Int
scala> plainOldSum(1, 2)
res4: Int = 3
Answer
scala> def curriedSum(x: Int)(y: Int) = x + y
curriedSum: (x: Int)(y: Int)Int
scala> curriedSum(1)(2)
res5: Int = 3

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149631069

Tags
#odersky-programming-in-scala-2ed #scala
Question
In any method invocation in Scala in which [...], you can opt to use curly braces to surround the argument instead of parentheses.
Answer
you’re passing in exactly one argument

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149631076

Tags
#odersky-programming-in-scala-2ed #scala
Question
What do you think the header of withPrintWriter looks like?
val file = new File("date.txt")
withPrintWriter(file) {
  writer => writer.println(new java.util.Date)
}
Answer
def withPrintWriter(file: File)(op: PrintWriter => Unit) {
  // ...
}

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149631091

Tags
#odersky-programming-in-scala-2ed #scala
Question
In this code you pass in a zero-arg function to delay evaluation; how would you rewrite it to use by-name parameters?

def myAssert(predicate: () => Boolean) =
  if (!predicate())
    throw new AssertionError
    
myAssert(() => 5 > 3)
Answer
change type () => Boolean to => Boolean:
def myAssert(predicate: => Boolean) =
  if (!predicate())
    throw new AssertionError

myAssert(5 > 3)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149631106

Tags
#odersky-programming-in-scala-2ed #scala
Question
Why is it an abstract method, not a variable (field) declaration?

abstract class Element {
def contents: Array[String]
}
Answer
because it is def not var or val

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







#odersky-programming-in-scala-2ed #scala
In Scala, fields and methods belong to the same namespace. This makes it possible for a field to override a parameterless method.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#odersky-programming-in-scala-2ed #scala
In Scala it is forbidden to define a field and method with the same name in the same class, whereas it is allowed in Java.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 149631233

Tags
#odersky-programming-in-scala-2ed #scala
Question
If a class has a parameter whose sole purpose is to be copied into a field, you can use a [...] instead
Answer
parametric field

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149631244

Tags
#odersky-programming-in-scala-2ed #scala
Question
How can you simplify this class?

class ArrayElement(conts: Array[String]) extends Element {
  val contents: Array[String] = conts
}
Answer
Create a parametric field:

class ArrayElement(
  val contents: Array[String]
) extends Element

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







#odersky-programming-in-scala-2ed #scala
it is possible to add modifiers such as private, protected, or override to parametric field
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 149631352

Tags
#odersky-programming-in-scala-2ed #scala
Question
To invoke a superclass constructor, you simply place
Answer
the argument or arguments you want to pass in parentheses following the name of the superclass.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149631359

Tags
#odersky-programming-in-scala-2ed #scala
Question
What is this (Array(s)) after superclass name?

class LineElement(s: String) extends ArrayElement(Array(s)) {
  // ...
}
Answer
call to superclass constructor passing this class constructor argument s

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149631372

Tags
#odersky-programming-in-scala-2ed #scala
Question
Scala requires override modifier for [...].
Answer
all members that override a concrete member in a parent class

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149631383

Tags
#odersky-programming-in-scala-2ed #scala
Question
The override modifier is optional if [...].
Answer
a member implements an abstract member with the same name

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







#odersky-programming-in-scala-2ed #scala
The == method is essentially the same as equals and != is always the negation of equals. So individual classes can tailor what == or != means by overriding the equals method. We’ll show an example later in this chapter.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#odersky-programming-in-scala-2ed #scala
The root class Any has two subclasses: AnyVal and AnyRef.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#odersky-programming-in-scala-2ed #scala
The methods min, max, until, to, and abs are all defined in a class scala.runtime.RichInt, and there is an implicit conversion from class Int to RichInt. The conversion is applied whenever a method is invoked on an Int that is undefined in Int but defined in RichInt.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#odersky-programming-in-scala-2ed #scala
On the Java platform AnyRef is in fact just an alias for class java.lang.Object. So classes written in Java as well as classes written in Scala all inherit from AnyRef.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#odersky-programming-in-scala-2ed #scala
AnyRef defines an additional eq method, which cannot be overridden and is implemented as reference equality (i.e., it behaves like == in Java for reference types). There’s also the negation of eq, which is called ne.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#odersky-programming-in-scala-2ed #scala
A trait definition looks just like a class definition except that it uses the keyword trait.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#odersky-programming-in-scala-2ed #scala
A trait can be mixed in to a class using either the extends or with keywords.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#odersky-programming-in-scala-2ed #scala
You can do anything in a trait definition that you can do in a class definition, and the syntax looks exactly the same, except:
  • a trait cannot have any “class” parameters
  • ​whereas in classes, super calls are statically bound, in traits, they are dynamically bound.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 149632079

Tags
#odersky-programming-in-scala-2ed #scala
Question
What does it mean that whereas in classes, super calls are statically bound, in traits, they are dynamically bound?
Answer
If you write “super.toString” in a class, you know exactly which method implementation will be invoked. When you write the same thing in a trait, however, the method implementation to invoke for the super call is undefined when you define the trait. Rather, the implementation to invoke will be determined anew each time the trait is mixed into a concrete class.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632090

Tags
#odersky-programming-in-scala-2ed #scala
Question
What does it mean to declare a trait which exends a class?

trait Doubling extends IntQueue {
  // whatever
}
Answer
it means that the trait can only be mixed into a class that also extends IntQueue.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632101

Tags
#odersky-programming-in-scala-2ed #scala
Question
How come an abstract method can call super? It would certainly fall for classes.

trait Doubling extends IntQueue {
  abstract override def put(x: Int) { super.put(2 * x) }
}
Answer
Since super calls in a trait are dynamically bound, the super call in trait Doubling will work so long as the trait is mixed in after another trait or class that gives a concrete definition to the method.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632120

Tags
#odersky-programming-in-scala-2ed #scala
Question
What does the combination of method modifiers abstract override mean and where can it be used?
Answer
It can be used only in traits and it means that the trait can be only mixed into a class that has a concrete definition of the method that is marked with these modifiers.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







#odersky-programming-in-scala-2ed #scala
Once a trait is mixed into a class, you can alternatively call it a mixin.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#odersky-programming-in-scala-2ed #scala
The order of mixins is significant.Roughly speaking, traits further to the right take effect first.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#odersky-programming-in-scala-2ed #scala
Scala’s on-demand imports are written with a trailing underscore (_) instead of an asterisk (*) like in Java.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 149632614

Tags
#odersky-programming-in-scala-2ed #scala
Question
if we have:

abstract class Fruit(
  val name: String,
  val color: String
)
what does import fruit._ mean?

def showFruit(fruit: Fruit) {
  import fruit._
  // rest of the method
}
Answer
you can use name and color (fields from Fruit) directly:
println(name +"s are "+ color)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632625

Tags
#odersky-programming-in-scala-2ed #scala
Question
What does it mean?
import Fruits.{Apple, Orange}
Answer
importing only 2 names from Fruits

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632636

Tags
#odersky-programming-in-scala-2ed #scala
Question
What does it mean?
import Fruits.{Apple => McIntosh, Orange}
Answer
This imports the two members Apple and Orange from object Fruits.
However, the Apple object is renamed to McIntosh.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632647

Tags
#odersky-programming-in-scala-2ed #scala
Question
How can I refer to java.sql.Date class if I use this in Scala?
import java.{sql => S}
Answer
S.Date

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632658

Tags
#odersky-programming-in-scala-2ed #scala
Question
What's the other way of writing
import Fruits._
in full, using import selector?
Answer
import Fruits.{_}

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632669

Tags
#odersky-programming-in-scala-2ed #scala
Question
How to import everything from Fruits but rename Apple to McIntosh?
Answer
import Fruits.{Apple => McIntosh, _}

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632680

Tags
#odersky-programming-in-scala-2ed #scala
Question
How to import everything except for Pear (i.e. exclude Pear) from Fruits?
Answer
import Fruits.{Pear => _, _}

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632691

Tags
#odersky-programming-in-scala-2ed #scala
Question
How can I write import p.n using full import selectors?
Answer
import p.{n}

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







#odersky-programming-in-scala-2ed #scala
The implicit imports in every Scala program are:
  • import java.lang._
  • import scala._
  • import Predef._

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 149632747

Tags
#odersky-programming-in-scala-2ed #scala
Question

class Outer {
 class Inner {
  private def f() { println("f") }
  class InnerMost {
   f()
  }
 }
 (new Inner).f() // is it legal in Scala? why? woudl it be legal in Java?
}
Answer
access (new Inner).f() is illegal because f is declared private in Inner and the access is not from within class Inner - in Java it would be legal

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632756

Tags
#odersky-programming-in-scala-2ed #scala
Question

class Outer {
 class Inner {
  private def f() { println("f") }
  class InnerMost {
   f() // is it legal in Scala? why? would it be legal in Java?
  }
 }
 (new Inner).f() // warning - illegal!
}
Answer
Yes. In both languages. A inner class accessing private member of the class it is declared in.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632767

Tags
#odersky-programming-in-scala-2ed #scala
Question
In Java protected members are accessible from subclasses and within the same package. How is it in Scala?
Answer
only accessible from subclasses

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632778

Tags
#odersky-programming-in-scala-2ed #scala
Question
Every member not labeled private or protected is [...].
Answer
implicitely public

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632789

Tags
#odersky-programming-in-scala-2ed #scala
Question
What does access modifier private[this] mean? Is it more or less restrictive than private ?
Answer
It is more restrictive, because it allows access only from the same object. Same class, different object is not allowed (think: typical implementation of equals() in Java has this.x == that.x; it wouldn't work with private[this] in Scala)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632800

Tags
#odersky-programming-in-scala-2ed #scala
Question
How to create package object for a package rocket ?
Answer

package object rocket {
  // definitions go here
}

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







Flashcard 149632811

Tags
#odersky-programming-in-scala-2ed #scala
Question
What do you put into package objects? How is it different than Java?
Answer
Any kind of definition that you can put inside a class, you can also put at the top level of a package, by putting it into package object. In Java, only classes and interfaces can be members of packages.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







#asset-swap #finance #gale-using-and-tradning-asset-swaps
if we par/par s wap a bond at a spread of -40 bp ( we receive floating less 40 bp) and this spread moves to -35 bp, we can unwind the position by paying on a swap of the same notional and pay floating less 35 bp to lock in a loss of 5 bp running. the upfront payment in the second swap makes us able to sell the original bond (from first transaction) at 100, exactly the price we paid for it in the first place. We got rid of the bond and we are left with 2 swaps in opposite direction, netting at -5bp fixed on every payment.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#asset-swap #finance #gale-using-and-tradning-asset-swaps
Quoted MVA spread involves a swap of notional equal to bond dirty price. Quoted spread, therefore, does not indicate unwind terms - your asset swap was likely bought at different dirty price than the one currently quoted, so you cannot easily unwind yours.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 149653186

Tags
#asset-swap #finance #gale-using-and-tradning-asset-swaps
Question
Is par/par asset swap duration-hedged?
Answer
No

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
One problem with the par/par asset swap methodology is that the trade is not duration hedged.

Original toplevel document (pdf)

cannot see any pdfs







Flashcard 149653211

Tags
#asset-swap #finance #gale-using-and-tradning-asset-swaps
Question
In MVA asset swap, the buyer’s receipts on the floating leg of the swap, which is based on a notional amount equal to [...], are adjusted by a fixed spread such th at the future value of the swap equals the excess paid over par, P-100
Answer
the dirty price of the bond

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
In MVA asset swap, the buyer’s receipts on the floating leg of the swap, which is based on a notional amount equal to the dirty price of the bond, are adjusted by a fixed spread such th at the future value of the swap equals the excess paid over par, P-100

Original toplevel document (pdf)

cannot see any pdfs







Flashcard 149653218

Tags
#asset-swap #finance #gale-using-and-tradning-asset-swaps
Question
In MVA asset swap, the buyer’s receipts on the floating leg of the swap, which is based on a notional amount equal to the dirty price of the bond, are adjusted by a fixed spread such th at the [...] value of the swap equals the excess paid over par, P-100
Answer
future

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
In MVA asset swap, the buyer’s receipts on the floating leg of the swap, which is based on a notional amount equal to the dirty price of the bond, are adjusted by a fixed spread such th at the future value of the swap equals the excess paid over par, P-100

Original toplevel document (pdf)

cannot see any pdfs







Flashcard 149653225

Tags
#asset-swap #finance #gale-using-and-tradning-asset-swaps
Question
In MVA asset swap, the buyer’s receipts on the floating leg of the swap, which is based on a notional amount equal to the dirty price of the bond, are adjusted by a fixed spread such th at the future value of the swap equals the [...] by the dealer to the investor.
Answer
excess paid over par, P-100

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
y>In MVA asset swap, the buyer’s receipts on the floating leg of the swap, which is based on a notional amount equal to the dirty price of the bond, are adjusted by a fixed spread such th at the future value of the swap equals the excess paid over par, P-100<body><html>

Original toplevel document (pdf)

cannot see any pdfs







Flashcard 149653232

Tags
#asset-swap #finance #gale-using-and-tradning-asset-swaps
Question
In [asset swap type?] asset swap, the buyer’s receipts on the floating leg of the swap, which is based on a notional amount equal to the dirty price of the bond, are adjusted by a fixed spread such th at the future value of the swap equals the excess paid over par, P-100
Answer
MVA

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
In MVA asset swap, the buyer’s receipts on the floating leg of the swap, which is based on a notional amount equal to the dirty price of the bond, are adjusted by a fixed spread such th at the

Original toplevel document (pdf)

cannot see any pdfs







#asset-swap #finance #gale-using-and-tradning-asset-swaps
The yield/yield asset swap trade is duration weighted
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on


Parent (intermediate) annotation

Open it
The yield/yield asset swap trade is duration weighted so that, to the first order of approximation, the yield/yield asset swapper is exposed only to the spread between the swap rate and the bond yield and not to market direction.</sp

Original toplevel document (pdf)

cannot see any pdfs




Flashcard 149653262

Tags
#asset-swap #finance #gale-using-and-tradning-asset-swaps
Question
The yield/yield asset swap trade [is/is not] duration weighted
Answer
is

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
The yield/yield asset swap trade is duration weighted

Original toplevel document (pdf)

cannot see any pdfs







Flashcard 149653277

Tags
#asset-swap #finance #gale-using-and-tradning-asset-swaps
Question
In yield/yield asset swap, is the trade convexity hedged?
Answer
No

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
In yield/yield asset swap, the trade is duration hedged, but not convexity hedged.

Original toplevel document (pdf)

cannot see any pdfs







#finance #inflation #inflation-derivatives #inflation-derivatives-barcap
The most regularly tra ded structure in the inflation-linke d swaps market, and particularly in the inter-dealer market, is the zer o coupon inflation swap. One counterparty agre es to pay the cumulative percentage increase in the price index over the tenor of the s wap (with some lag on the referenc e index, similar to cash securities) , and the other pays a comp ounded fixed rate. There ar e no exchanges until the maturity of the swap, or in other words it is a zero coupon transaction
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #inflation #inflation-derivatives #inflation-derivatives-barcap
compounded fixed rate paid at the maturity of the zero coupon inflation swap formula is
\(\Large notional [(1 + fixedrate)^{tenor} - 1]\)
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #inflation #inflation-derivatives #inflation-derivatives-barcap
the payment of the cumulative percrentage in the price index over the tenor of the zero coupon inflation swap formula is
\(\Large notional(\frac{InflationIndex_{i+tenor}}{InflationIndex_i}-1)\)
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #inflation #inflation-derivatives #inflation-derivatives-barcap
As it is only the final and t he initial index values that determine the val ue of the inflation leg, which might be thought of as the floatin g leg, there is no path depe ndency to cloud the mark et’s implied inflation exp ectation given by the fix ed rate, or breake ven.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #inflation #inflation-derivatives #inflation-derivatives-barcap
An inflation-link ed bond asset swap is essentially the same thing as a nominal bond asset swap , with the fu ture cash flows of th e bond pri ced by the nominal swap curve of the curre ncy concerned. It is then translated into a Libor flow, plus or minus a spread.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#asset-swap #finance #gale-using-and-tradning-asset-swaps
The yield accrete methodology for asset swaps arises from an attempt to overcome the problems of ad vance and dela yed payments i n par/par and MVA transactions. It is in some sense a hybrid of the two techniques.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#bonds #finance
Pull to Par is the effect in which the price of a bond converges to par value as time passes.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Pull to par - Wikipedia, the free encyclopedia
to: navigation, search This article does not cite any references or sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (December 2009) <span>Pull to Par is the effect in which the price of a bond converges to par value as time passes. At maturity the price of a debt instrument in good standing should equal its par (or face value). Another name for this effect is reduction of maturity. It results from the differenc




#asset-swap #finance #gale-using-and-tradning-asset-swaps
In the yield accrete construction, we are really swapping cash flows including the expected mark-to-market loss/ gain due to the pull-to-par on the bond (often loosely called ‘the yield’) for income tied to Libor.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#asset-swap #finance #gale-using-and-tradning-asset-swaps
In yield accrete asset swap methodology, because the swap is at market, collateralisation does not complicate the transaction.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#asset-swap #finance #gale-using-and-tradning-asset-swaps
in yield accrete asset swap methodology, the floating amount will be calculated on the expected price of the bond each year (neither par nor current price of the bond)
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#asset-swap #finance #gale-using-and-tradning-asset-swaps
In the yield accrete asset swap methodology, we don’t know what the pull- to-par will be in a changing yield environment , of course.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#asset-swap #finance #gale-using-and-tradning-asset-swaps
The yield accrete asset swap spread, S , solves the following equation:
\(\Large C\sum_{i=1}^{n_{fix}} df(t_i)=\sum_{i=1}^{n_{float}}[a_i(L_i+S)N_i+(N_i-N_{i-1})]df(t_i)\)
where N are estimates of bond price for given future periods
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #steiner-mastering-financial-calculations-3ed
A repo is an arrangement whereby one party sells a security to another party and simultaneously agrees to repurchase the same security at a subsequent date at an agreed price.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #steiner-mastering-financial-calculations-3ed
Repo is equivalent to the first party borrowing from the second party against collateral
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #steiner-mastering-financial-calculations-3ed
A reverse repurchase agreement (reverse repo) is the same arrangement viewed from the other party's perspective.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #steiner-mastering-financial-calculations-3ed
The deal is generally a "repo" if it is initiated by the party borrowing money and lending the security
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #steiner-mastering-financial-calculations-3ed
The deal is generally a "reverse repo" if it is initiated by the party borrowing the security and lending the money.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Article 149653504







#finance #steiner-mastering-financial-calculations-3ed
A forward-forward is a cash borrowing or deposit which starts on one forward date and ends on another forward date. The term, amount and interest rate are all fixed in advance.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #steiner-mastering-financial-calculations-3ed
FRA is used to fix in advance the interest rate on the borrowing. When the time to borrow arrives, the borrower borrows the cash in the usual way. Under the FRA, which remains quite separate, he receives or pays the difference between the cash borrowing rate and the FRA rate.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #steiner-mastering-financial-calculations-3ed
A FRA is an off-balance-sheet instrument
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #steiner-mastering-financial-calculations-3ed
Dates for FRAs in GBP are based on today.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #steiner-mastering-financial-calculations-3ed
Dates for FRAs traded internationally in currencies other than GBP are generally based on spot.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #steiner-mastering-financial-calculations-3ed
Steepening: long-term rates rise relative to short-term rates
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #steiner-mastering-financial-calculations-3ed
Flattening: long-term rates fall relative to short-term rates
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




#finance #steiner-mastering-financial-calculations-3ed
the terminology of steepening and flattening is used the same way round even if the curve is negative to start with
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 149654093

Tags
#test
Question
The Kintsch & Greeno model is restricted to a problem set which can be formed by paraphrasing the 14 prototype problems given in Riley et al. These include Change problems (give-take)
Answer
edit answer

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

pdf

cannot see any pdfs







statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on




#test
degenerate word problems, in that they only contain information that is directly problem relevant. An extension of the theory is presented here which dea

OK dude
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs