Sunday, May 31, 2015

creative writing - How do we draw the line between plagiarism and allusion?


It’s no secret that in literature we see characters that remind us of other characters. Furthermore, it’s no secret we see plots that remind us of other plots.


For example, an author reads Book A and decides to model the main character in his novel, Book B, after the main character in Book A. Is he alluding, plagiarizing, or neither? The same question goes for plot as well.


To give some flesh to this example, consider the case of Romeo and Juliet. Shakespeare, although he did include elements of his own, borrowed from prior written works. Do we give Shakespeare a pass because of his brilliance? Perhaps the conduct I’ve described isn’t unethical.


Where do we draw the line?



Answer



We don't. It's a blurred line and a fortune in legal costs on arguing where it lies.


Of course there is a classification, but the lines are always blurred.



On the "white side" there's alluding - when you make your own characters, but draw specific parallels, exploring what-if's of the other work, mocking its shortcomings, or referencing its most brilliant elements. Example: "Space Balls" heavily alludes to "Star Wars", often parodying its elements.


There's also drawing inspiration. It's where you take some of the concepts, but modify them deeply enough to make your story entirely original. Example: "The Lion King" was inspired by "Hamlet".


The gray area has referencing and pastiche. Referencing is when you copy concepts of the original, nearly verbatim, but apply a twist deep enough to create an original story. It may or may not be legal, it may fall under fair use, or be treated as a derivative work. Example: "The Last Ringbearer" is "Lord of the Rings" retold from perspective of the Orcs.


Another gray area practice is Pastiche. It's purposeful, deliberate copying of one's style, up to and sometimes including forging the signature. Since style can't be copyrighted, it's technically legal... in most cases. In art, "discovering" a "lost" Van Gogh painting will be treated as full-scale crime, even if the forgery isn't a copy of any existing Van Gogh painting, merely a pastiche of the style. Sometimes it's a parody (and then protected as fair use), but sometimes it's serious. Example: Dave McClure's poem "The Traveler" is a pastiche of Edgar Alan Poe's "The Raven".


Then there's the dark area of plagiarism, where not enough original thought was put into the work to set it apart as unique, and outright piracy where all pretense of authorship is dropped; only revenue is redirected.


But again, how little referencing is merely drawing inspiration - or how much is plagiarism - this is not firmly defined.


"Group think" and least common denominator in writing groups?


So, I knew my Chapter 1 would be tedious last night, but i was still surprised that everyone asked that it be, instead of a Chris McCandless-style solo exodus to the wilderness (which is how the thing starts), a fast paced action thriller.


Put another way, the things that were requested in the next re-write were to introduce more dialogue (there is some, but the guy is alone), put him in the city instead of in the wilderness (?), and similar.


Put yet another way, it felt like the group was succumbing to group think, where each person's writing should hew more closely to every other person's writing.


To be clear: the feedback is invaluable and I will use it.


But: Question: Do writing groups become tunnel-visioned ... and come with their own set of biases? Along the lines of "Group think"?


My instincts are yes, that this is human nature, and I am curious if you would agree or not. Again, the feedback from the critique group was valuable and I am OK with bias (especially because it is a different one than my own.) I'm just curious if that might happen in these critique groups.


I mentioned my chapter 1 here yesterday.



Answer





Do writing groups become tunnel-visioned ... and come with their own set of biases?



I believe they do, just as part of human nature. There are many studies on this regarding the outcome of focus groups, and in psychology: How 9 actors can convince, by consensus, a single test subject that his eyes are lying to him. It actually has been shown to have serious consequences in wrongful jury convictions. (By recollections of the jury that found an innocent person guilty).


You are facing the same kind of focus group. A friend of mine in advertising does filmed focus groups for radio and TV commercials, and he says there is always somebody in the group that people will start to look toward to see if they are going to speak. Sometimes a person with good or interesting observations, but usually a bit of a bully that is just expressing a strong opinion with certainty, interrupting people, making jokes about their observations, whatever.


That's human nature. Any community of people that interact a lot is going to come to a "norm" they adhere to and then lean toward it. About what is "good writing", what is a "good twist", what is "good dialogue".


You can see it now, amateur critics on line reviewing and trashing Stephen King or Dan Brown or JK Rowling for their terrible passages or scenes. Well I'd wager King and Brown and Rowling disagree, and obviously the public has decided to give them a few billion dollars for their efforts.


A camel is a horse designed by a committee. Not only that, but they are pleased with how much they've improved upon the horse.


If you want to write horses instead of camels, study horses: Best selling authors.


+1 to Mark for using such a group to become a better writing critic. I would add another step: While you do that, apply your critiquing skills to existing best selling authors, you can buy their work for 25 cents in the used bookstore. Then realize they've made millions, so if the rules you are learning about how to critique are making them look bad: It is almost certainly your rules that need to be refined or toned down, not the bestselling author. Because clearly it isn't keeping King or Brown or Rowling from producing killer entertainment, and clearly people don't care if they end some sentences with prepositions, or use vulgar American comma rules instead of the British rules, or whatever.



Stick to advice from the people you aspire to emulate. I know you cannot ask them questions directly, but if you take notes on their work as you read it, you can try to find where they have answered it by example.


legibility - Do columns of text hurt readability on websites?


I have no problem reading articles that are broken into multiple columns of text in newspapers and magazines but this does not seem to carry over to the web for me.


I recently came across an article on the web that had two columns of text. I found it very hard to focus on the right column. I messed with the CSS a bit and even after I made some color, font-size, column-gap and line-height adjustments I still just couldn't seem to focus on it properly, my eyes kept drifting to the left.


Is my brain just so used to one column of text being the main content of an article on the web?


Also, this article was long enough that I had to scroll back to the top after I finished the left column to read the right. Is this as bad for usability as I think it is? It's definitely wasteful to have to scroll to the top.



Answer




Its kind of hard to figure out what might the exact issue with the layout of the text without having to see it but here is what this article (Practical Tips for Utilizing Columns of Text in Your Layouts) says about using multiple columns in websites



Many print and web designs you see today employ a simple, single column design for the main text element. Most printed books use one column of text per page, although this was not always the trend. Many older hardcover books featured two columns of text per page; multiple column formats are still commonly used for books such as dictionaries and almanacs. Using a single column for type on websites is preferred so that type is easy to read as you scroll down the page.


Multiple column layouts are best reserved for applications that can be viewed all at once, such as in print projects or for e-readers. Multiple column layouts are most commonly used by newspaper and magazine publishers and in newsletters.



This academic paper (Is Multiple-Column Online Text Better? It Depends!) has this to say about how reading speed might be affected by the use of single and multiple columns



The purpose of this study was to examine how multiple columns and text justification impact online reading in terms of reading speed, comprehension, and satisfaction of a narrative passage. Results from this study showed that reading speed was significantly faster for two-column full-justified text than for one-column full-justified text. Post-hoc analyses showed that it was the fastest readers that benefited the most from this format.


Slower readers showed their fastest reading and highest reading efficiency at the one-column left-justification condition. This may be because the very short lines impeded the reader’s ability to take in an optimal amount of information at each fixation. Gutherie & Wigfield (2000) assert that a slow reader may lose all information about the beginning of a sentence from short-term memory before he or she has read to the end. Slow readers may also have had difficulty "keeping their place" with the multiple line length conditions for this same reason.




Given below is a graph of the relative reading speed across multiple columns from this article


enter image description here


With regards to your comment of



Also, this article was long enough that I had to scroll back to the top after I finished the left column to read the right. Is this as bad for usability as I think it is?



I would definitely agree since you are have to do a sudden transition to a center point in the screen while moving your eyes from bottom to top and while reading ensure that your scan starts from the central point and not from the extreme left. With regards to the optimal amount of text per paragraph,check out this excerpt from this article about Readability



Blocks of text should not be too long or too wide.


When paragraphs get long, they’re harder to read because there’s less whitespace. Whitespace gives paragraphs shape, which acts like visual bearings, making it easier to find your place, and to find the start of the next line. Using more, smaller paragraphs suits web content particularly, because it lets you subtly highlight more useful phrases, by putting them in their own paragraph, or starting a new paragraph.



For similar reasons, long lines (wide paragraphs) are slower and harder to read than narrower ones. Lines of around 100 characters present neat bite-size chunks of text that can easily be decoded, and also make it really easy to scan round to the start of the next line.



Saturday, May 30, 2015

android - Alternative for circles page indicator for many pages?


What's a good alternative for indicating that the user can swipe across the screen to get the next/previous item and/or showing the current position, considering that there are many pages (usually tens but sometimes upward of 100) -- so having a representation of all the pages wouldn't be possible.


Example of pagination on Android with page indicator visible



Showing the page number like "2 of 22" seems a bit dull. Would combining that with the circles method be good or would it just be confusing?


EDIT: Just to clarify things (for my particular problem) , this is the 3rd level in a hierarchy : First you get choose from a list of categories, then you choose an item from a list of items in that category, then you see the details for this item and can swipe left or right to remove the need of going back to the second list.




adobe photoshop - Convert a map image to black and white


I would like to convert an image from google maps


enter image description here


into a black and white edition, without gray scale, something that will look like that


enter image description here


How can this be achieved with Adobe Photoshop CS5?




Saving Illustrator as PDF without the hidden layers


We have roughly 55 cards that all have the exact same text. The titles and backgrounds differ among the cards. So I've made just one AI with the different backgrounds and all the text as one copy in a layer on top.


Now I can just hide each background layer and save as PDF. But even unchecking preserve editing capabilities, the file sizes let me know that it is still including the images and backgrounds for all the hidden layers. Doing a quick test and deleting all the hidden layers brings the file sizes done considerably.


I was under the impression that saving as a PDF without editing capabilities only saved what was needed for that particular PDF. It seems I was wrong. Do I just have to keep deleting the hidden layers for each copy?




Friday, May 29, 2015

website design - Which is the landing page and which is the homepage?


So I'm confused about which page is considered home and which is considered landing.


I got 2 web pages: 1 page is the login page when the user enters the website URL and other is the notification page after the user has been logged in.


My assumption is that the login page is the landing page and the notification page that the user goes to when they click on the website logo button on the top left corner is the home page. Am I correct or is it the other way around?




Answer



Landing Page
Generally:
1. Page shown to the user visiting the site for the first time.
2. Page shown to the user when the user is visiting your site via some other source.
3. "Home Page" and "Landing Page" could be considered as one.


Home Page
Generally:
1. Page appears after clicking "Home" tab on the site.
2. Page appearing right after "Landing Page".



Overall
Terminology depends on the basis of navigation and sitemap.


Hope this helps.


exchange - Where can I see the bid stack for FX?


In trading FX binary options on brief tenors like 1 hour, I frequently see the FX price bounce right on the expiry boundary, like hourly or 20 minute boundaries.



I would like to figure out if these bounces represent actual trades or just manipulation of the FX price by market makers submitting short spurious bids.


However I don't know where FX prices "come from" (e.g. Reuters feed, Bloomberg). Are there any visible FX exchanges where I can easily see the current bid/ask price stack of open orders for FX and see what has actually been traded versus what is just a posted offer?


Also, what is the minimum lot size of an order needed to move the Reuters feed for EUR/USD for example? I.e. if a market maker is moving the underlying price, how much risk do they take on when putting a bid in the stack?



Answer



The FX price bounce you see near expiration is generally because market makers are continually hedging their positions. When a market maker sells a binary option, she is left with a short gamma position. This short gamma is very high near the barrier level, especially close to expiry. The additional delta hedging or the delta hedge unwind is what causes these jumps. To answer your question, these jumps are a result of actual trades, the size of which is usually a function of how short or long the barrier/ strike the market(banks/ market makers) is.


I am not sure about Reuters, but Bloomberg aggregates quotes from multiple brokers(banks and other liquidity providers). This ladder is observable on a Bloomberg terminal. You can also customize it to show only ladders from selected counter-parties. This is especially useful when you are executing via the Bloomberg terminal. But FX being the most traded, the spreads are quite tight and ladders are quite similar across different brokers. Exchange volumes are much lower compared to the OTC volume, which drives most of the price action.


Having traded fx, a guesstimate is that you would have to trade in billions to move a currency like EURUSD by 10-15 pips.


adjustments - Total Return measurement paradox w/ Adjusted Close Prices


Using total return calculations is critical in developing security selection models.


The standard way to measure total return is to develop a series of price-adjusted data. Investopedia describes the standard method here: http://www.investopedia.com/ask/answers/06/adjustedclosingprice.asp


Essentially, capital distributions/dividends to investors are deducted from the historical close price series. When calculating the return over the holding period using this series: $r(t) = \frac{P(t) - P(t-1)}{P(t-1)}$, you are calculating the actual profit/loss return including dividend distributions.


However, it's possible that the dividend adjustment will cause some adjusted historical prices to go below zero. For example, consider Avis adjusted close prices in 2003. The adjusted close price in May 2003 is about -$\$1.5$. The adjusted close price a year later is $\$80$. This is a considerable return. However, when calculating the return $\frac{85 - (-1.5)}{-1.5}$ a negative return is produced because of the denominator.


One approach would be to "forward adjust" dividend adjustments as opposed to deducting dividends paid on the prior series. But then the forward-adjusted close prices would not match prices traded on the exchange (complicating trade execution, etc.). Another approach is to shift the -$\$1.5$ and $\$85$ above the zero line some arbitrary amount. This diminishes the actual return the farther up the number line the two price points are shifted.


Yahoo calculated dividends adjustments on a percentage basis, not on a absolo



Any suggestions on how to solve this problem?



Answer



Don't subtract dividends; add them.


Add-back the dividends as if they had not been paid out. That will ensure that you have a positive price when deriving the returns.


For example, MSFT paid a 0.16 dividend on 2011-15-02. Here are the raw prices, according to Yahoo:


date       close
----------------
2011.02.01 27.99
2011.02.02 27.94
2011.02.03 27.65

2011.02.04 27.77
2011.02.07 28.2
2011.02.08 28.28
2011.02.09 27.97
2011.02.10 27.5
2011.02.11 27.25
2011.02.14 27.23
---------------- <- dividend was paid here
2011.02.15 26.96
2011.02.16 27.02

2011.02.17 27.21
2011.02.18 27.06
2011.02.22 26.59
2011.02.23 26.59
2011.02.24 26.77
2011.02.25 26.55
2011.02.28 26.58

Yahoo's own adjustment is to subtract the dividend for all dates prior to the payment, exactly as your question states. But if all you want is the return, then add-back the dividend after the payment. Thus, we have:


date       close

----------------
2011.02.01 27.99
2011.02.02 27.94
2011.02.03 27.65
2011.02.04 27.77
2011.02.07 28.2
2011.02.08 28.28
2011.02.09 27.97
2011.02.10 27.5
2011.02.11 27.25

2011.02.14 27.23
---------------- <- add-back dividend
2011.02.15 27.12
2011.02.16 27.18
2011.02.17 27.37
2011.02.18 27.22
2011.02.22 26.75
2011.02.23 26.75
2011.02.24 26.93
2011.02.25 26.71

2011.02.28 26.74

The return calculations won't match Yahoo's exactly. Yahoo's adjusted first and last price are 27.83 and 26.58, for a return of -4.49%, whereas the return from my adjusted prices above is -4.47%. But my returns are guaranteed to be more sensible simply because I know there will never be a negative price.


Thursday, May 28, 2015

Is it illegal to imagine a real person for a fictional character?


There are times I meet someone for a brief time, maybe a couple hours, and their personality impresses me enough to create a fictional character about them. Obviously I am adding my own attributes to the fictional character, and I don't know them well enough to write about many of the real person's attributes, but the original impression on me will be central to their character. Is it illegal to create a character this way, where the character development is loosely based on a real person this way?


When I am writing I make sure the connection is loose enough that the person could not be identified. I guess my main concern is if someone would read my book (which is a work in progress) and be like "oh I remember seeing this author for a couple of hours and this fictional person has a similar personality to me" Could they sue me?



Answer




Since most characters in every story draws from a conglomeration of different people the author met/ saw/ heard, the answer is likely 'no' (I'm no attorney). Make sure the character is not exactly the same as the person (which you already identified as something you did).


I sat down at the door of a Wal-Mart one day and imagine short stories about every person that walked out the door every 5 minutes. I took some quotes, looks, mannerisms, all from examining people. This is a trick a writing teacher taught us to do.


The key is making the characters different "enough"


Dark or white color theme is better for the eyes?



What is better for the eyes, a dark color theme or a white color theme?



Answer



There has been a lot of research on this topic since the 1980s and a lot of it still holds true today. One study from the 1980s states this:




However, most studies have shown that dark characters on a light background are superior to light characters on a dark background (when the refresh rate is fairly high). For example, Bauer and Cavonius (1980) found that participants were 26% more accurate in reading text when they read it with dark characters on a light background.


Reference: Bauer, D., & Cavonius, C., R. (1980). Improving the legibility of visual display units through contrast reversal. In E. Grandjean, E. Vigliani (Eds.), Ergonomic Aspects of Visual Display Terminals (pp. 137-142). London: Taylor & Francis



The reason why this matters is because of focus. As this article on UXMovement states, "white stimulates all three types of color sensitive visual receptors in the human eye in nearly equal amounts." It causes the eye to focus by tightening the iris. Since the eye is focused, dark letter forms on light backgrounds are easier to read. When using a dark background with strong light letter forms, the iris opens to allow more light in, but that causes letter forms to blur. Why?



People with astigmatism (approximately 50% of the population) find it harder to read white text on black than black text on white. Part of this has to do with light levels: with a bright display (white background) the iris closes a bit more, decreasing the effect of the "deformed" lens; with a dark display (black background) the iris opens to receive more light and the deformation of the lens creates a much fuzzier focus at the eye.


Jason Harrison – Post Doctoral Fellow, Imager Lab Manager – Sensory Perception and Interaction Research Group, University of British Columbia



Now there seem to be varying factors into contrast and legibility. Room ambient lighting. Brightness of the monitor. Also you can mitigate the straining effects of white (#FFF) on black (#000) by simply lessening the contrast like using a light gray (#EEE, #DDD, #CCC) on a dark background (#111, #222).





Update (Feb 7, 2020):


A new article from the Nielsen Norman Group entitled, "Dark Mode vs. Light Mode: Which Is Better?", brings some more research to this topic. A couple key findings in the article:



Cosima Piepenbrock and her colleagues at the Institut für Experimentelle Psychologie in Düsseldorf, Germany studied two groups of adults with normal (or corrected-to-normal) vision: young adults (18 to 33 years old) and older adults (60 to 85 years old). None of the participants suffered from any eye diseases (e.g., cataract).


...


Their results showed that light mode won across all dimensions: irrespective of age, the positive contrast polarity was better for both visual-acuity tasks and for proofreading tasks. However, the difference between light mode and dark mode in the visual-acuity task was smaller for older adults than for younger adults — meaning that, although light mode was better for older adults, too, they did not benefit from it as much as younger adults, at least in the visual-acuity task.



The research did find though that dark mode seemed to be beneficial for users with impaired vision:



In Legge’s study, each of the 7 participants with cloudy ocular media had better reading rates with dark modes, whereas the rest of the participants, who had impaired central vision, were not affected by contrast polarity.




Though they did note one caveat that this study used CRT displays instead of LEDs displays.


A few takeaways from the article:



  1. In general, light mode leads to better performance most of the time for users with normal or corrected-to-normal vision.

  2. While light mode performs better, those gain seem to be more short-term. Long-term exposure may be result in myopia.

  3. Increased font-size in dark mode doesn't offset the gains from light-mode.

  4. Providing a dark mode though is still recommended though becomes of the potential long-term effects with light mode, some visual impairments perform better in dark mode, and some users simply prefer it.

  5. For applications which provide long-form reading (books, articles, even news sites), dark mode options are recommended.



One other note with the studies cited in the article is that the studies focused on "glanceable" reading (i.e. reading 1-2 words on a mobile phone, smartwatch, or car dashboard).




Further reading:



language - Should I use American or British English?


I'm working on a few small games, and I was wondering if I should use American or British English for my user interface? I'm not targetting any specific country, and this will probably be the only localization.



Answer



As much as it pains me to say it (as a Brit), if you're not going to have any localisation go with American spellings. This will be the preferred spellings for the vast majority of users - either as native speakers (Americans far outnumber the British) or as second language speakers (though there are significant number of those who use British English spellings).


The only exception would be if you are going for a "quirky, English vibe" for your game.


website design - Buttons instead of radio buttons or a dropdown


In a recent project of ours I am tasked with creating an interface that solves the same problem as radio buttons or a dropdown menu would, but using buttons instead.


It approximately looks like this:



mockup


download bmml source – Wireframes created with Balsamiq Mockups


I wonder what you think the implications this has over using dropdowns and radio buttons and why it is good or bad or neither. Please back your answer with evidence or personal experience rather than taste.



Answer



This kind of UI elements exists and is used in many applications even if differently.


Facebook events


enter image description here


Google calendar


enter image description here


If well designed they are even more affordant than the usual radio buttons.



enter image description here


The thing is, because of this affordance they seem "auto selected" so there is no need of a validation like in your example. Therefore I would say radio buttons and drop-down are better here because they need a validation to be used (or at least it is expected to work this way).


fiction - What are the stages of The Guardian's Journey?


In constructing a story, I plan on following the following patterns:


The Hero's Journey: The Hero's Journey


The Villain's Quest: The Villain's Quest


My question is, what would be the structure of "The Guardian's Journey"?


By guardian, I mean a character that watches over and guides the hero, and even the world.



A good example of this is Gandalf from "The Lord of the Rings", or Sider Ament from "Legends of Shannara: Bearers of the Black Staff".



Answer



I don’t think there is an archetypal “Guardian’s Journey” in the same sense that there is a Campbellian “Hero’s Journey”. Your Guardian character can be a static force in the story, or could learn from his/her experience guiding the Hero to be an even better Guardian (Gandalf), or become disillusioned about the whole Guardian role (Saruman), or... whatever works best with your main plot line.


PS: Before you invest too many brain cells in making your story comply with “The Hero’s Journey” archetype, you should read these cautionary words from Film Critic Hulk.


design - Alternatives for Radio Button?


Both Radio button and Switch button does the same job - Selecting one option at a time. Is there any other way for choosing between the two given options other than Radio/switch buttons?


In my case, the list of options will display only after selecting either of the given choices. So i dont want to use Radio button. Currently I have a switch button. Please suggest me an alternative. Thanks


enter image description here




Answer



Toggle switches or radio buttons are both good choices for this use case. Unambiguous, familiar, effective. Good job!


Option 1/2 rendered as a toggle switch Option 1/2 rendered as radios


Of course you can set the radio buttons to default to option 1, so that there is always one selected.


I would avoid using buttons with active/inactive states, as when you have only two options it becomes ambiguous which of the two is selected, You see this a lot (particularly in DVD menus, amiright?) and it's not helpful:


Two options rendered as buttons - avoid!


Hope that helps :)


returns - How to calculate the annual contribution of a fund to a portfolio of funds?


let's assume I have a portfolio of two funds (call them F1 and F2), where, by convention, there is a monthly compounding of the returns.


On a monthly basis, the contribution of each fund will just be Weight_Fi*Return_Fi.


On an annual basis, though, since the assumption is that there is monthly compounding in the whole portfolio (in the sense that Return_portfolio_year = (1+Return_portfolio_jan)*(1+Return_portfolio_feb)...) I cannot think of any straightforward way to calculate the annual contribution of each fund.




Answer



These problems arise when you compute arithmetic return contributions: in a given month, you want the sum of the funds' contributions to equal the portfolio return. The sum of these single-month contributions over more than one month will never equal the total portfolio returns over more than one month.


One way to include the compounding effect is to 'pretend' that a segment's return contribution in one period is reinvested in the overall portfolio in succeeding periods.


Here is an example, with R code. There are just two periods: first F1 makes 10%, then F2 makes 10%. The weights of F1/F2 are kept constant at 50% each.


library("PMwR")
weights <- rbind(c( 0.5, 0.5),
c( 0.5, 0.5))

R <- rbind(c( 10, 0),
c( 0 , -10))/100


rc(R, weights, segment = c("F1", "F2"), timestamp = 1:2)

The output will be


$period_contributions
timestamp F1 F2 total
1 1 0.05 0.00 0.05
2 2 0.00 0.05 0.05

$total_contributions

F1 F2 total
0.0525 0.0500 0.1025

F1 makes a higher overall contribution because its single-period contribution occured earlier and hence is compounded by the overall portfolio return.


(The PMwR package, of which I am the author, is available from GitHub https://github.com/enricoschumann/PMwR .)


Wednesday, May 27, 2015

typography - Baseline Grid vs. Readability


Any designer worth their salt will talk about the importance of the grid, and rightfully so. However, as I've continued to practice my trade, I've found that the baseline grid in particular doesn't always seem practical to me.


For example, I work with a lot of marketing sheets that have bulleted lists. My first inclination is to space everything evenly and keep the baseline grid, as so:


Unordered List with baseline grid spacing


But a lot of times, we come to the conclusion that even though the bullets separate the items, the even spacing between lines and between list items makes it harder to separate the points visually. So we end up with something like this:



Unordered List without baseline grid spacing


Each list item is better distinguished, but now the baseline grid is gone and the whole thing feels a little messier.


On a smaller level, here's another example:


Another spacing example


Keeping a proper baseline grid makes a two-lined title look like separate things, but changing the spacing to correct that harms the flow (if some people only had a one-lined title).


It's possible that I could just still be inexperienced enough to not know how to have my cake and eat it too here. But I suspect that this could be a scenario where design rules have to be flexible to address different priorities.


But I'll ask regardless: Which is more important - maintaining a baseline grid in a situation like this, or compromising the grid to achieve gains in readability?



Answer



Problems with baseline grids are easier to resolve if you keep in mind this overriding rule: the only purpose of graphic design is to facilitate communication. That's what you are hired for, what you are paid for, and what you are depended upon to do. A grid (or any other design element) is useful an appropriate only if it achieves that purpose.


Information on a page is easier to approach and to assimilate if it has a good visual hierarchy (headlines, subheads, body copy, sidebars), is grouped appropriately (things that belong together are, in fact, together), and is spaced appropriately, including margins and other white space.



A layout grid brings order to the page and lets illustrations, graphic elements such as white space, headlines and text to align in an orderly way that can lend authority or a feeling of "rightness" to the page. There are many ways to to one; they don't all consist of evenly spaced lines and columns.


A baseline grid, as DA01 points out, works well in multi-column layouts. It is also useful in situations where a very formal, controlled or surgically clean look is appropriate. Outside of books and other text-heavy publications, more often than not, you need a less formal look.


The question you can ask of any design choice, especially in typography, is "Will this make the communication easier to grasp, easier to find, or more effective?" If the answer is "No," then it's wrong.


Your example is a great case in point: forcing the bullet points onto a baseline grid wrecks the readability of the text. Communication is boss, so you immediately know that sticking to the grid is wrong. A single item of information, like an address or the text of a bullet point, must also be a single visual item on the page. It follows that separate items of information must be separate on the page.


So it's not a matter of whether it's okay to compromise the grid to achieve better communication. It's that you must never compromise the communication, period. Design it to communicate. Use the rules and techniques of design as much as you want, to make it communicate brilliantly. But never, ever let rules or techniques get in the way of the communication.


text - Highlighting issue with InDesign pdf


When highlighting text in a PDF exported from InDesign, the highlight doesn't select the text in the right order. How can I fix this?


Screenshot




equities - Why can sometimes stock prices rise when interest rates rise?


Basic macroeconomics theory states that stock prices are inversely correlated with interest rates, i.e., when interest rates rise, borrowing is more costly, and thus companies with huge debt would be hurt. As a result, their expected earnings would be forecast to decline, which would eventually translate to declining stock prices.


However, history suggests than they are not always negatively correlated. Therefore, under what conditions does the opposite hold, i.e., stock prices are positively correlated with interest rates?



Answer



In the chart below, I'm showing the rolling correlations between stock returns and bond returns. (The relationship would be flipped if you are studying stock returns vs interest rates).


As you can see, for the bulk of the history since 1960s, bond returns and stock returns were indeed positively correlated; i.e., when stocks went up, bonds went up too (and interest rate declined). The past 15 years or so, however, bond returns and stock returns have turned negative (i.e., stocks go up, bonds go down/interest rate goes up).


The historical "norm" was that negative supply shocks tended to cause the equity market to tank, while the coinciding high inflation hurt bonds as well. Nowadays, with inflation expectation very well anchored, bonds have largely become synonymous with recession-hedges – people buy bonds (cause rates to decline) when stocks are performing poorly ("flight-to-quality").


The past few years' experience is also interesting. The Fed buying up a lot of Treasuries (quantitative easing) plus the zero-interest-rate-policy has emboldened risk taking, sending S&P to records.


So to sum up, how stocks & interest rates move relative to each other is very much dependent on the macro backdrop.


Reference: Antii Ilmanen's "Expected Returns" (2011)



Stock/Bond Correlations


branding - Can I make changes to the Facebook 'f' square logo like removing the background?


The Facebook Do's and Don'ts say that I'm not allowed to modify the logo.


I don't want to modify the logo, I just want to use the white 'f' without the blue backdrop. Does anyone know if this is permitted? I can't speak legal-ese!



Answer



What you'd like to do falls under "don't".


From page 68 of the Facebook Product Assets and Identity Guide:



DON'T



Modify the “f” logo in any way, such as changing design or color. If you are unable to use the correct color due to technical limitations, you may revert to black and white.


Snippet of branding guideline



Cutting the 'f' away from the backdrop is definitely an alteration.


Tuesday, May 26, 2015

tenses - Do modern readers believe the first person narrator can't die?


Back in highschool in the 90s we had an assignment to write an extra chapter for a book. After some discussion the teacher told us that under no circumstances can we kill the protagonist as the book was being told in first person and therefore the protagonist must survive to now be telling us the story.


Is this a way modern readers think? Do most people feel safe reading a work thinking that the protagonist will not die, not even on the last sentence of the book?


I remember Kickass specifically addresses this, reminding the viewer that he might be telling this story from heaven. Is this something that the reader has to be told to not feel safe? Has this trope been done enough now that the narrator is in danger?


Also does the tense of the work matter? Does putting a story in present tense make the narrator more logical to die as he is telling the story now, and not having survived after the fact?


To make it clear, I am not asking if I am allowed to kill the narrator without betraying the reader. I am asking if first person reduces tension.



Answer



Well, logically speaking, if it's first person, if you kill the narrator, it would be hard for the story to continue unless you change the perspective to someone new. Which.. defeats the purpose of first person in my opinion. Stories are told pass tense, which means that the person has to survive in order to tell the tale. They aren't usually written in the present. You could put some twist to it that at the end this person dies and the narration is from the person telling the story on their death bed or the likes...


Reflecting on all the stories/movies I have enjoyed, I don't recall a point where the narrator died when they played an active role in the story. Two that come to the top of my head currently... 300... the narrator was one of the warriors who was the only one to survive and was sent back to Sparta. Ends with him finishing the tale on the precipice of battle with a full army at his back.



We have sandlot... who told the story through the eyes of Smalls and ends with him in current day being a sports caster observing Benny steal home.


Even the Hobbit, was told of Bilbo recalling his tale of his journey, having the trilogy begin and end with him in modern day. Lord of the rings, was a story narrated from Frodo's perspective and end with him handing his writing to Sam before sailing.


So I would say yes, the narrator must survive to tell the tale. The only way I could see you writing the narrator die is if you pull something like in the titanic... The story was told from Rose's perspective. Ending with her in modern day/present day after having finished her story and poetically dying on the waters above where the Titanic sank.


EDIT: In response to your edit of the question, my answer is no, knowing the person narrating is going to live or die does not take away from the thrill of the story. The thrill is in the journey itself as I commented on Mark's post.


I go on a vacation, and I tell my friends about the white water rapids trip I took where the water threw me around narrowly dodging rocks, hitting a wave and being tossed out of the raft! GASP THEN! I was tumbling under the water in the current gasping for air as my head came above the choppy water every so often! TO MAKE IT WORSE! There was a fork in the river where one path took me towards a water fall and I had no way of controlling myself! Before I knew it my back smacked into a rock holding me in place in the river. I managed to grab onto a tree root and pull myself to safety and wait for my friends to come get me. That my friends is how I ended up all bruised and with a broken rib.


Obviously here in this made up vacation... we know the person is going to live.. they are telling it to our face! But it's the suspense and excitement that keeps you listening as they recall the story of how they nearly died and came home in a body cast. You are invested in it because hopefully this person is a friend you care about!


Point being, make your character where the audience is invested in them! Whether they die or not won't make people care about them if they aren't invested. A good character with a good story will make people invested and enjoy the thrill. Even if they know this person will live or die.


To further add, there has been several anime where it was pretty obvious from episode 1 that said character would die at the end. Even when you knew it was coming, that didn't change the fact that someone decided to chop onions on the last episode and make my eyes water. You are bonded to the story, to the characters and their tale is entertaining enough that even when you know the outcome, it still emotionally moves you.


fixed income - Attributing the change in NII to Shift, Twist and Butterfly


The movement of the zero rate curves can be decomposed into a shift movement (the level of interest rates) and a twist movement (the slope of the curve) and butterfly (the curvature of the curve). If we want to stress the net interest income (NII) of a bank by shocking these three factors, how do we attribute the change in NII of each of these factors? So far, I have identified following steps. Please correct me if I am going wrong or missing something somewhere:



  1. Find the Shift, Twist and Butterfly (STB) - Which one is industry practice to arrive at the shift, twist and butterfly factors from the current term structure- PCA or factor model?

  2. Shock S,T,B - Apply the required shock to the Eigen vectors of the three factors

  3. Find the new yield curve - Add the new Eigen vectors weighted by their Eigen values to arrive at the new yield curve.

  4. Recalculate NII based on the new yield curve - The thing that is not clear to me is how do I attribute the change in NII to the shocks given to shift, twist and butterfly.



Thanks in advance.



Answer



Your steps 1. to 3. sound reasonable. I am not sure about industry practice (what industry?) I always do step 1. using PCA on historical correlations. If you plan to do a regulatory exercise better check with your regulator what he prefers.


Most interesting to me is step 4. which - I think - is in general impossible to do. This can be achieved only in very special cases. From what you describe, you model single discrete stress scenarios such as +/-100bps flat, which is good since it is a very special case. Assuming one stress each for S,T,B you have in total 7 = 2^3-1 different scenarios (3 single stresses of S,T,B , 3 where you have two stresses S&T, S&B and T&B and one where you stress S&T&B). If your portfolio reacts in a "simple" fashion (technically: The stresses do not interact) then Delta(S&T) = Delta(S) + Delta(T) and so on and you can decompose in the obvious way by reporting the marginal changes, i.e. the differences from each single stress. If your portfolio is more complicated, you are in big trouble and you should seriously consider whether such an attribution makes sense at all. If your stress factors are random variables you need to apply the thinking above in a regression context.


typesetting - Typography: First line indent in the first paragraph?


A colleague explained to me that it is a typographical rule to not set an indent for the first line of the very first paragraph of a text, the one that starts right after the headline. Instead, the indentation should start with the second paragraph. However, I am finding examples in various publications where the indentation starts right with the first paragraph. Then again, others do it the way it was told me.


Is there a "right" way to do it, and if so, why? If not, what are the advantages/disadvantages of either method?


Indent in first paragraph Indent in second paragraph



Answer



First of all, the point of indenting the first line of paragraphs is to help the reader distinguish adjacent paragraphs when reading or skimming the text. Doing this in addition to not justifying the last line of a paragraph has several advantages:




  • The non-justified line may still take up almost the entire linewidth.





  • It is helpful to have some sort of orientation at the left side of the paragraph to help your brain find the right line to continue. If you only have a straight wall of text on the left side of the paragraph, it is more difficult to find the correct line.




  • Not justifying the last line of a paragraph does not work with unjustified text. While the last line is still shorter on average, there will be cases which are impossible to identify as a last line of a paragraph.




Obviously, this advantage does not apply to the first paragraph. Here you have the following dilemma:





  • Indenting the first paragraph causes some optical dissonance because the gaps in the left side of a text block are unbalanced: You start with a gap, but you do not end with one (unless you have an orphan which is bad for another reason). Also the point where you have to start reading is somewhat more difficult to find: For example, if you follow the left edge of the paragraph to the top, you will end up at the second, not the first line.




  • Not indenting the first paragraph makes paragraph formatting somewhat inconsistent.




In my opinion, the first problem is more severe, but that’s, well, just my opinion.


Wrong colors while printing from Illustrator


I’m trying to print from Illustrator (CMYK) and it comes out red: All the blue tones appear black and everything that was either beige or grey looks like it has a red layer over it. All the colours seem to be affected (except for white).



  • The printer is an HP Envy 4500.

  • I’ve tried to save it as a PDF and print from that PDF instead but it didn’t work.




creative writing - Does a novel require a conflict?


Unless a better writer can dissuade me I am minded to say no. The 'essential' 'conflict' is cultural. It is part of the western 'Human Condition' - Eastern cultures have stories without conflict.


Indeed, I'd venture the first story you ever wrote did not contain a conflict. It was entitled "Me and Mommy in the park" and was little more than a juvenile chronicle - regardless it was still a story.


My next experience comes from comedians, 'The two Ronnies' spring to mind. Their stories (jokes) had no conflict and in many examples the expected conflict never materialised. (That fact, in itself, making the story humorous). The skill of these comedians lay in how long they could entertain whilst stringing-out a simple story.


In my personal development as writer I began the exercise of how long I could go in a story without introducing a conflict. (I can do about 60k).


This is a very old debate - the defence of the argument seems to be to broaden the definition of conflict.



My current position is that conflict is not a requirement. In comedic terms - how long can you string out a joke before revealing the punch line.


I have been asked to clarify this question as it has been flagged as similar to 'Can you have a story with an antagonist?'. Antagonist is generally used with regard to character driven conflicts (Hero vs Villain). The films 'The Martian', 'Gravity' and 'Castaway' do not have antagonists because the character is alone. (Wilson is a foil). These stories are tales of struggle. Whether 'struggle' = 'conflict' is a debate in itself.




Monday, May 25, 2015

estimation - Musiela parameterization


I have a question regarding the proof of the Musiela parametrization for the dynamics of the forward rate curve. If $T$ is the maturity, $\tau=T-t$ is the time to maturity, and $dF(t,T)$ defines the dynamics of the forward rate curve, then the Musiela parametrization defines the forward rate dynamics $$d\bar{F}(t,\tau)=dF(t,t+\tau)$$.


My question is regarding the next step in the working of the Musiela parametrization. All of the literature I've looked at explains the next line by simply stating that a "slight variation" of Ito is applied. The line reads:


$$d\bar{F}(t,\tau)=dF(t,T)+\frac{\partial F}{\partial T}dt$$



Can someone please clarify what variation of Ito is being used here? I'm not following. The parameters to $d\bar{F}$ do not include an Ito drift/diffusion process, so why is Ito being used?



Answer



$dF(t,T)$ describes the dynamics of the rate of a particular forward contract as time $t$ moves forward to a fixed expiration $T$.


$d\bar F(t,\tau)$ describes the dynamics of the rate at a particular point on the yield curve as time moves forward.


The differential $\frac{\partial F}{\partial T}dt$ is simply the difference between holding the expiration time $T$ constant in the case of $F$ and moving it ahead with time $t$ to stay at the same point $t+\tau$ on the yield curve in the case of $\bar F$.


Somewhere underlying all this is a drift-diffusion process, but it isn't stated explicitly in your equations.


$dF(t,t+\tau)$ is a "total" differential of $F$ with respect to a simultaneous change in both its arguments. This becomes the sum of a partial differential w.r.t. change in the first argument only, $dF(t,T)$, and a partial differential w.r.t. change in the second argument only, $\frac{\partial F}{\partial T}dt$, as time moves forward.


novel - Incorporating research and background: How much is too much?


The amount of research I'm doing for my novel is staggering. To the point where my spouse says I need to write a companion book (or a blog) just talking about the research! Sometimes I research for hours simply to include one line.



I live in terror of having my characters eat a food that didn't exist in that time and place! Okay, not really. But that is in fact the level of accuracy I'm going for.


Food is one example. I describe in detail the first meal my time travelers have when they arrive in ancient Egypt. The second meal I wrote more sparsely and my critique group jumped on me. They wanted more! This makes sense because the Exodus (yes, the Exodus) is starting in a few days and the contrast between the rich assortment of food they ate in Egypt vs the manna and quail they have in the desert is an important part of the story. Though my group wasn't thinking of that, they just liked my food descriptions.


I'm also researching clothing, housing, furniture, songs, linguistics, hair styles, ethnic groups, landscape, plants, makeup, musical instruments, dance styles, footwear, brickmaking, agricultural practices, domesticated animals, wild animals, weather, metalworking, joinery, midwifery, medicine, and so much Torah I say it's like having 20 bat mitzvahs (only that's a huge underestimate).


In addition to using beta readers (and some basic common sense), how do you balance the amount of research you're doing with how much ends up in the work? Some times it's easy, because the research makes subtle changes you incorporate, other times it's harder to figure out.



Answer



I think you're conceptualizing this wrongly. The research doesn't end up in your work, it informs your work.


The amount of research you do ends up affecting the fabric of your book, how real it feels, how multilayered the world is, how unexpected the details, and connections. But NO piece of research should ever be included in your book just because you know it. Your research is there so you have something to draw on whenever you need it. To put it another way, you aren't doing research to put it in your book, you're doing it to pull your book out of it.


As far as how much research you need, it needs to be enough that your world feels compelling and real, but not so much that it's stopping you from writing. If it isn't interfering with your writing, no amount of research is "too much." If it inspires you to write richly detailed prose, that's all to the good. But if you're shoehorning it into the book, not because it belongs, but just to show off your knowledge, then it's "too much." And if you're spending all your time researching, and you never actually write the book, that's "too much" too.


password - Is it necessary to verify a user's email address?


It's pretty much a fact that users hate having to open a new tab, go to their email service, log in, wait for the email to arrive and then click a link/paste a code.


Is it really necessary to do this though? The only reason I ask for an email address is for if the user has forgotten their password. But, my thinking is, it's up to them if they want to run the risk of not being able to reset their password.


Should I verify their email address, or should I just warn them that should they enter an invalid email then they won't be able to reset their password if they ever lose it?



Answer



We have spent the last months battling with what to do with email confirmation/verification - prior the user had to give all their details at sign up (way too many actually!) but couldn't actually login until they had confirmed their email address by clicking a link.



We stood back and looked at why we did this - three reasons really, one being we wanted users to be able to reset their password etc but also because we wanted to assured of the identity of anyone interacting with our application and this was one small way of doing so. Additionally, we wanted to know the country, industry, employees etc for our clients for marketing reasons but this is flawed as we have literally HUNDREDS of signups for companies called some variation of TEST with 1 employee working in accounting.


The problem we had was emails sometimes don't get delivered - whether it is for technical reasons or simply delays or people entering the wrong email address/typos and this was creating work for our support team but also making a poor first impression for the prospective client.


A few weeks ago we made two major decisions - we now allow clients to signup by just giving us their email address with no requirement for confirmation.


Upon doing so they are immediately logged in (so no waiting) and, in the background, an email is sent asking them to set their password by clicking a link.


This email, in effect, works as a verification email - if they were never serious and were just tyre kicking then they will either have entered a dummy email address or they will never confirm in which case we are no worse off. Indeed by asking for them to create a password we could be better off as only those who are serious and / or like what the application does and looks like etc will actually do so.


If they are serious then they need to create a password to be able to login next time - we are working through more notification within the application to let clients know they need to create their password etc but, as of this morning, we have had ZERO support emails in the last three week raised due to non receipt of signup emails.


There has been a drop in confirmed signups which we expected but this, in itself, is pretty meaningless as previously they would have signed up, kicked the tyres and never logged in again whereas now they signup, kick the tyres and just don't create a password. We need to work through the overall impact in terms of accounts created, number of users and other success metrics etc but, overall, it looks positive.


I still believe we have a need for some sort of email and identity confirmation - the way we now approach it is slightly different to how we did before but it gives the same outcome without being a barrier to the customers initial experience and first impressions and that was what was most important to us.


UPDATE:


Just thought I would update this with some stats - we changed our signup process on 28/10/2013. Below are two charts - first one shows confirmed signups (i.e. those who have then gone on to create a password) and the second shows all signups which is more akin to prior data points where all accounts were confirmed before being able to login.



As you can see, there is a drop off in the first chart where almost half of those who signup do not confirm / create a password (this maps to our current stats which shows around that percentage who only login once) and the second chart shows that, at the top end, this has not impacted signups with the number of signups remaining fairly consistent pre and post making the change.


enter image description here


enter image description here


Whats the best default for search result sorting?


I'm working on a news search, and I find that sorting by the number of keyword matches tends to produce stale results, but sorting by date tends to produce irrelevant results.


How do I strike a balance? I'd rather have a good default so users don't have to muck about the settings themselves.



Answer



TL;DR: Use a multi factor ranking system.


A good example to follow is the way that Google rank search results. We of course don't know the precise details of their ranking algorithm, but they have arguably done the most research on this and have the most success. What we do know for sure is that Google include a large number of factors and apply a weighting to each to give a final results ranking.





I'll try to give you a crude example of how it could be done:


Assign a value to each result based on its age.
the last 10 minutes = 100
the last hour = 80
the last 6 hours = 70
the last day = 60
the last week = 40
etc.


Assign a value to the keyword density
5 or more matches = 100

4 matches = 80
3 matches = 60
2 matches = 30
1 match = 10
0 matches = 0


Create a weighting matrix
Date vale = 8
Keyword density value = 4


Work out the rank value for each article
Multiply the value for each factor by its value in the weighting matrix for each article



An article from 1 day ago with 4 keywords would have a rank value of:
60 * 8 + 80 * 4 = 800


An article from 10 minutes ago with 3 keywords would have a rank value of:
100 * 8 + 60 * 4 = 1040


You would then show each result by it's computed rank value.


Some things to note here. You don't strictly speaking need the weighting matrix, but it makes it easier to tune the results - which you should do. Also, to get good results you would probable need to include more than two factors. You could for example assign weighting to the length of the article; or the publisher of the article. All these choices are really more of an art than a science, so you will need to play around with it a bit.


transparency - GIMP - How to make a GIF with transparent background


As the title suggests, I'm trying to make a GIF in GIMP to use as a logo in After Effects, however, it's not going well.


What I expected was just the gif with the transparent background I made using the fuzzy select, shown here:


enter image description here



However, I receive this.


enter image description here


And when I import to After Effects, the white background completely screws me over.




input fields - Inline validation icon usability


I have been looking at the styling for validation of input forms of Bootstrap, and wondered if there was a specific reason for where the icons used for inline input validation is positioned.


enter image description here


I thought that the icon outside the input field would be clearer because there are many different types of input fields that also contain actions (e.g. search), whereas the standard for Bootstrap is to place it within the input field.


Are there some examples or references out there to demonstrate the usability/practicality aspects of where the validation icon is placed?




Sunday, May 24, 2015

equities - PPPN: participation rate, stocks and premium


I'm a student of financial engineering and am very new to all of this stuff. Now, I'm trying to make an "example of a beginners exercise", but alas, I don't have any clue on how to solve or even on how to begin this one. The exercise goes like this:



Suppose you have a PPPN where the invester recieves at maturity date $80 \%$ of his investment plus a premium, defined by: \begin{equation} p \cdot N/S_0 \cdot (S_T - S_0)^{+}, \end{equation} where $(S_T - S_0)^{+} = \max(S_T - S_0,0)$ is the positive stock return over the period $[0,T]$ ($t=T$ is the time to the Maturity date), an investment $N$ and where $p$ is the participation rate. Now, set $p$ such that the product is attractive for investors and you have a certain margin.



In order for this exercise to get more real, I've chosen a stock at random, say Facebook, and assumed a maturity date of 13/12/2016. Here is the information of the stock found today, credits to yahoo finance: enter image description here


I thought it would be wise to choose $N= S_0= 102.12$, so that the equation of the premium simplifies to:



\begin{equation} p \cdot (S_T-102.12)^{+}. \end{equation}


Unfortunately, that's where my insights end. I don't have any clue on how to make further progress on this problem. Personally, I would just set $p =100 \%$, so you get the maximum possible return, but that can't be right. Any ideas/pointers/solutions?




user behavior - How to make a progress-speed bar more understandable?


I've just installed Windows 8 and noticed the brand new File copying dialog. When expanded, it shows the progress and the current transfer speed in one graph. However, the graph confuses me greatly. The faster it copies, the quicker progress increases (left-to-right) and the higher the graph (bottom-to-top). I think this makes the speed graph non-linear, and I have trouble reading the graph. This makes the graph no more than a toy.


A Dutch progress/speed bar in the Windows 8 copy dialog


It's in Dutch but I think the gist is clear.


I assume Microsoft's design team have discussed all pros and cons of this graph, so there must be some merit to this design. I would like to write a custom control for my own application that also shows progress and speed in one bar, but I don't think this is the way to go. How to make the speed part of the bar more understandable and useful? What are the alternatives?




To illustrate the problem I have with it:


Half the time at full speed, half the time at half the speed.



This graph indicates that for half of the total transfer time, the file was copied at half the speed (e.g. 30 seconds of half speed if the total copying took one minute). That would be useful information but is not clear to me from the graph.



Answer



You can overlay your progress bar with a transfer rate graph pegged to 100% width. The result is a constantly updating histogram that remains linear throughout the operation. This gives you a simple way to display both progress and transfer rate on the horizontal axis. An example:


enter image description here


This is a rough visual example; to make it more readable you'd want to properly label things to ensure the progress bar and the histogram are district.


If your users care about watching throughput over time -- perhaps for debugging or instrumentation purposes -- this layered approach provides an easy way to monitor it during the operation. If users aren't expecting this data or this type of design, they might just find it distracting.


PRIIPs stress scenario 2 calculation period of calculation


I have recreated the calculations based on the examples in the JC 2017 49 flow diagram. A couple of questions that I am hoping someone can help with.


I can get back to the exact numbers for everything apart from the stressed scenario. For 5 yrs I get the same result. For 3 yrs I get the correct result if I use 3 years as the RHP and for 1 yr, I think they have taken the SD of 22 days instead of 21 days, but can get back to a result (though the number of days they have used seems strange).


Has anyone else had this problem?


Looking at the final annexes, in Annex IV page 20 it states: Calculation of scenario values for the recommended holding period 4. The scenario values under different performance scenarios shall be calculated in a similar manner as the market risk measure. The scenarios values shall be calculated for the recommended holding period.



This suggests that the RHP period should be used for the calculation of all performance scenarios, however, having read a number of different responses to questions on this site the general consensus is that the full 5 years data should be used. This seems inconsistent with the annexes and also the fact the other stress scenarios are based over the RHP. I am confused as to why 5 years be used when the guidance seems to confirm that the RHP should be used?


Thanks in advance for all your answers.




website design - How to create an animated demo of my webdesign?



How to create an animation of my webdesign so the client can see the interactivity in the page (including popups, tooltips...) instead of seeing a set of still images? I used to make this task using after effects. Is there another way to do that? Thanks.




Answer



I was in your situation and I used some tools like http://www.appdemostore.com/ and http://giveabrief.com/.


Appdemostore allows you to test their tool and create one demo for free; however, the pricing plans start from $20 and go up to $120. Giveabrief also allows you try the tool for free. If you are ready to invest, you can buy a full license that costs $199.


Both of them are very easy to use, just take your screenshots and add what interaction you need. You can include buttons, icons for pinch, extend etc. Hope it will help you. :)


website design - How can I showcase a working example of my past web development work, without linking to the constantly changing live site?



Whenever I design a website, I think it's useful to not only show screen captures but also coding abilities.


Unfortunately, most of the time, clients end up editing websites themselves and if they're not paying me for maintenance, the site will lose some of its appeal which doesn't make me too fond of inserting URLs in my portfolio.




  1. Are there any best practices to showcase web design/UI (that is actually working and not a simple screen capture)?




  2. Do you keep an offline copy to show clients?





  3. How do you link it to your existing website (Behance or other)?





Answer



Well there are several things you can do but I think personally a site is best viewed at its desired state, which is a site. If you own your own domain with hosting I really don't see why you couldn't sub-domain your sites (such as clientproject.emilie.com) if you are worried that the finished project to the client will be altered. Just add a basic screenshot like some do based on desktop, tablet, and mobile then provide a live link to the sub-domain.


Some other options since there are tons of different types of mobile sites is if you have an old phone and are a regular phone-geek (one that buys the latest every time) load a few sites on the phone as a demo and hand it to a possible client. Same rule could apply for a tablet.


If you can't subdomain, just take a laptop and make sure your laptop has something like XAMPP (everything), MAMP (mac), or WAMP (Windows) to run the site of you dont know how to install Apache, PHP, SQL, etc.


Also, dont be afraid to provide details. If you designed the site then tell them, I designed the site but I had someone else code it. That option works well if you are worried about using the live site but only have the screenshot.


style - All persons fictitious disclaimer — ideas regarding modification?


I'm creating a parody/spoof magazine which contains some "real" advertisements and businesses in.


How should I word an "all persons fictitious" disclaimer to include fictitious businesses?


This is my current disclaimer:



All characters appearing in this work are fictitious. Any resemblance to real persons, living or dead, is purely coincidental.



What's the best way to expand on it? This is a footer on every page of my Quark XPress document, by the way.




option pricing - Ways of treating time in the BS formula



The Black-scholes formula typically has time as $\sqrt{T-t}$ or some such. My questions:



  • What is the granularity of this? If we treat $t$ as the number of days, then logically on the day of expiry, d1 would involve division by zero.

  • Given that $t$ is the number of days in the year, what value should we divide it by? 252 or 365? It is that important? It it worth using quantlib to take account of various calendars?



Answer



Two quick points:




  1. Recall that the derivation involves continuous time and $(t, t+\Delta t)$ arguments---so the granularity is (at the margin) infinite. And hence time zero does not really get reached until we actually are at expiry.





  2. Generally speaking want the number of business days, not calendar days, and holidays do matter. So one generally uses the 'number of trading days til expiry / 252'.




Here is a quick example moving maturity from 1 year to 0.9975 years


R> library('RQuantLib')
R> EuropeanOption("call", 100, 100, 0.01, 0.03, 1, 0.4)
Concise summary of valuation for EuropeanOption
value delta gamma vega theta rho divRho

16.5382 0.5927 0.0096 38.2821 -8.3458 42.7367 -59.2749
R> EuropeanOption("call", 100, 100, 0.01, 0.03, 0.9975, 0.4)
Concise summary of valuation for EuropeanOption
value delta gamma vega theta rho divRho
16.5150 0.5926 0.0096 38.2332 -8.3578 42.6295 -59.0986
R>

Saturday, May 23, 2015

forms - When soliciting donations on a website, should you start by providing a box for the donation amount?


A coworker forwarded me some feedback she had come across during an annual giving network discussion regarding website design for online giving websites:



I'm jealous of this https://giving.sc.edu/givenow.aspx even better is their main page http://giving.sc.edu/ which features not a click to give button, but rather, a box to start writing in the amount of your gift!



On our own website, we have a prominent "Donate" button that brings users to a form, which starts with an introduction about what the donation will be used for. Additional fields on the form make it clear to the donor the level of control they have over what the donations would be earmarked for.


I'm concerned that if we implemented a system where the dollar amount was the first thing entered, before any context would be given, that no matter how convenient it seemed, it might discourage potential donors. It would also seem to eliminate the possibility of upselling to a larger donation amount, if the first step is to put the amount of the donation.


Is it better to start with a dollar amount, or provide more context for the donation before asking for a specific amount? Will one strategy yield a higher conversion rate, or potentially a higher donation amount?


If it is relevant, our donor demographic is generally affluent senior citizens, with very few of our donors being under the age of 50.



Answer




This kind of change typically need A/B testing before making a decision.


First thing, some people simply do not give, so do not lose time with them. Therefore you have to focus on people that donate.


Help them ! Give them 4 choices and a pre-selected one :


mockup


download bmml source – Wireframes created with Balsamiq Mockups


People who want to give can find a hindrance in choosing the right amount. So by giving them choices you help them evaluate and compare their donation (there is a case with FT subscription pricing about that but I cannot find it), pre-selection is also a way to help them make a choice.


adobe illustrator - How to fit text box size to text?


I want to fit the artboard to selected art (two text boxes) - the text boxes are larger than the text inside them - how do I fit (shrink) them to wrap tightly around my text?



Illustrator version - CS5



Answer



Illustrator doesn't (as of 5.1) have a handy "fit frame to content" feature like InDesign. Just select the text frame and drag the handles inward until the frame is snug to the text.


How do I embed Google Web Fonts into an SVG?


I'm writing an article on my site about the advantages of new web technologies, among others HTML5, CSS3 and SVGs, one of the advantages of the latter being the ability to select text in what is otherwise effectively an image.


I'm new to SVGs, and just made my first decent graphic in Illustrator. I've embedded it into a page with the GWF script for the Ubuntu font in the tag. As it turns out, the Ubuntu font displays correctly in regular text, but for this trick to work in the SVG, the Google script has to be embedded in the SVG itself. How can I do this?



Answer



You embed fonts in CSS by using base64 encoding. You can apply styles in SVG documents similar to CSS by using a

Where ... is the base64 encoded font data.


You can find examples of this by looking at Typekit's stylesheets. I'm not sure if the mime type of font/woff is correct, as I've also seen people claim that it should be application/font-woff. Though font/woff, font/truetype, font/opentype, etc. seem to be more popular.


Alternatively, you could actually take the SVG version of the web font and embed the SVG font's description markup inside of your document (though browser support is still very limited as Luke notes in the comments).


However, you should also be able to link to an external font according to the SVG specification. That would seem to be the best solution if you're gonna have multiple SVG documents referencing that font.


r - Portfolio Optimization - Zero beta portfolio


I am trying to solve a optimization portfolio in R in which I do the following constraints:




  • Set weight sum to within a boundary

  • Set return to a certain value

  • Set portfolio beta to 0


The purpose is then to minimize risk subject to the constraints above.


While I have no trouble in doing that my issue comes next. I want to make the weights such that the portfolio's total exposure to a factor is 0. Imagine asset a has a beta of 0.3, asset b has 0.7 and asset c -0.3. How can I set this constraint? My issue is that using quadprog I can only add an external parameter vector(mean returns in this case). Is there a way to go around this issue or am i seeing thing s the wrong way?


The code I have so far is as follows :


6 assets and six mean returns. Also, a 6*6 var-cov matrix. The upper weight bound is lev_ub and the lower bound is lev_lb. Returns_full is the vector with returns.


dvec = matrix(colMeans(returns_full),ncol = 1)
Dmat = cov(returns_full)

A.Constraint1 <- matrix(c(1,1,1,1,1,1), ncol=1)
A.Constraint2 = matrix(c(1,1,1,1,1,1), ncol=1)
Amat <- cbind(A.Equality1,A.Equality2, dvec)
bvec <- c(-lev_ub,lev_lb,target_return)
qp <- solve.QP(Dmat, dvec, Amat, bvec, meq=0)

My issue comes now from the fact that assume I have another vector of length 6 with one beta for each asset. I want to make it such that the sum of the product of weights and betas is zero or,in other words, set the total portfolio beta to 0. How can I add this constraint ?




commodities - How to de-seasonalize natural gas term structure data?


I need to de-seasonalize Nat Gas futures data for a project and am hoping to get good suggestions. As we all know natural gas futures are priced higher for the winter months and to analyze/model the term structure we need to de-seasonalize the data.


Any ideas how would one do it?




Font Organisation


I am trying to organise my fonts so when I am in Illustrator or PS that the fonts are as one single font.



Not one font for bold, one for italic etc. - Like this:


enter image description here


Rather it should be in sub-divisions, like this:


enter image description here


For example there are some fonts you install that install as a singular font. So when I scroll looking at fonts it takes an eternity to get through them all as some have so many different variants or weights.


But I need to just click on [desired font] and then choose the variant as when I am scrolling through fonts, it takes forever just to move past one font as sometimes they have 20-30 variants not installed as a group/family.




adobe illustrator - How do I get my vector art to have crisp lines on instagram?


As soon as I upload my art to Instagram, the quality decreases. I have tried everything I can think of. I have used 1080x1080 image resolution, and larger, exported it in many different files (JPG, EPS, SVG). The quality never changes and always ends up the same.


If anyone knows how to fix this problem, it would be much appreciated!


enter image description here




How do you check your option calculations?


I'm implementing a bunch of different algorithms to price options/find Greeks: finite difference, Monte Carlo, binomial...


I'm not really sure how to check my calculations. I tried using QuantLib to price things for me, but it seems to use actual dates a lot (whereas I'm just interested in year fractions) and the documentation is lacking.


I implemented a finite difference algorithm as described in Wilmott's "Mathematics of Financial Derivatives" and he has some numbers in his book. But my "implementation" of just the analytical Black-Scholes formula already gives different results than his (not by much though).


Again, I just typed up the down and out call option formula from Zhang's Exotic options. He actually goes through explicit examples for each of his formulas.


But for a down and out call with $S = 100$, $K= 92$, $H = 95$, $r = 0.08$, $q = 0.03$, $\sigma = 0.2$, $\tau = 0.5$ he gets \$6.936 and I get \$6.908.


So my question is, what is your go to reference for option prices for checking your code?



Answer



1: Follow the calculations in The Complete Guide to Option Pricing Formulas. The book has many formulas, sample values and outputs. Highly recommended for validating your results. Apparently, this is one of most popular books used by real-world quants (simple and fast).


2: You can still use QuantLib to price with year fractions. I have an example:



DayCounter dc = Actual360();
Date today = Date::todaysDate();
Date exerciseDate = today + 90;
assert(dc.yearFraction(today, exerciseDate) == 0.25);

Here, we make the exercise date exactly 0.25 year fraction away from today (pricing date). Anything from QuantLib using the dates should match your own implementation. You can adjust the exerciseDate, print the yearFraction and use it in your own code.


3: Use fOptions. fOptions and it's related fExoticOptions are R-packages. They implement the most commonly quantitative finance models. For example, I use the following script to validate my Levy Asian options:


LevyAsianApproxOption(TypeFlag='c', S=6.80, X=6.90, SA=6.80, r=0.07, b=-0.02, sigma=0.14, Time=0.50, time=0.50)


4: Use OptionMatrix. OptionMatirx is a finance calculator runs on a desktop computer.


American Options relation between greeks


Considering an American option in a Black-Scholes model, is there a relation between Vega and Gamma as it holds in the European case?


I am aware an exact relation would be difficult to find. But in practice is there a kind of approximate relation between these two quantities?



Answer




No, you should not expect such a relationship to hold in general. The reason is that American options have an "exercise barrier" which European options don't, and this results in different prices and greeks.


In the case of put options (with interest rate $r>0$) as the spot price falls, at some point it becomes optimal to exercise early and take the cash. Beyond this point, the option behaves like a short position in the stock, so its delta is exactly -1 and its gamma is zero. As the spot crosses through this barrier, the gamma jumps.


Vega, on the other hand, does not have such a discontinuity. The chart below shows the price of a European and American put with strike 100, three months to maturity, risk-free rate 15% and volatility 20%. The European prices and greeks are from the Black-Scholes model, and the American prices and greeks are from a binomial tree.


enter image description here


Note that when the spot price is sufficiently far from the early exercise barrier, it is unlikely to cross it, and the option behaves like a European. In this case you expect the standard relationship between gamma and vega,


$$\nu = \sigma\tau S^2 \Gamma$$


will approximately hold. The plot below shows how this relationship holds when the spot price is sufficiently far above the strike, but breaks down when it approaches the early exercise barrier.


enter image description here


Friday, May 22, 2015

inkscape - Copy, paste, move colored squares - but keep them aligned to the grid


I am developing a word game for iOS and would like to use an SVG file as the gaming board.


The SVG file (author: Denelson83, Wikimedia Commons) is almost perfect for my game - except for displaced colored squares.


My question is:


How could I please copy such a colored square (is it a Group?), then paste it and move the new square to a new spot - but still keep it aligned to the grid?


screenshot


As an Inkscape newbie I have already found out, that I can jump to the "original" with Shift-D.


And I can hold CTRL key to move objects horizontally or vertically.


But I still don't understand how to keep the moved square aligned to the grid (which also seems to be in a separate layer - so how did the author manage to keep all squares aligned to the grid?)


And also I can't find some view/dialog/toolbar, which would show me the coordinates of the object being dragged by me (I only see the coordinates of the mouse pointer at the bottom right). If I could see/change those coordinates, then I could (in a tiresome way) calculate and set the coordinates for the new squares...



UPDATE:


I've toggled Snap to grid and also enabled showing the grid:


grid


but the square doesn't snap to the grid when I drag it.


And also the grid is too small and I can't find how to make its cells broader.


UPDATE 2:


I have found where to set the grid size (15 x 15) and offset:


properties


But while the grid looks ok now and snaps too - it snaps in the wrong places as shown below.


snapping



Why doesn't the grid snap at the square's borders?


Is this maybe a bug in Inkscape? How to workaround it please?


UPDATE 3: I've received an offline advice to hold ALT while dragging a square



Answer



In order to snap the whole group, you need to enable "Snap bounding box corners", by clicking on the proper icon in snap toolbar:


Snap bounding box corners


Usually this flag isn't enabled and you see the snap to text baseline:


Default snap to text


Enabling this flag you can see the snap to the bounding box of the group (or the selection);


Snap to bounding box corners



You can change the behaviour of the snap using the other buttons in the toolbar. See here for reference.


Be aware that the snap depends from the position of your mouse in the selection: if you begin to drag the group with the mouse near the text, the snap would be related to the text, if your mouse is near the top-left corner of the box, the snap would be related to the top-left corner of the box (if "Snap bounding box corner" is enabled), and so on.


technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...